Octopus
pseudopotential.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!! Copyright (C) 2023-2024 N. Tancogne-Dejean
3!!
4!! This program is free software; you can redistribute it and/or modify
5!! it under the terms of the GNU General Public License as published by
6!! the Free Software Foundation; either version 2, or (at your option)
7!! any later version.
8!!
9!! This program is distributed in the hope that it will be useful,
10!! but WITHOUT ANY WARRANTY; without even the implied warranty of
11!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12!! GNU General Public License for more details.
13!!
14!! You should have received a copy of the GNU General Public License
15!! along with this program; if not, write to the Free Software
16!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17!! 02110-1301, USA.
18!!
19#include "global.h"
20
22 use debug_oct_m
24 use global_oct_m
25 use io_oct_m
26 use math_oct_m
28 use mpi_oct_m
31 use ps_oct_m
32 use pseudo_oct_m
36 use unit_oct_m
38
39 implicit none
40
41 private
42 public :: &
49
50 integer, public, parameter :: &
51 SPECIES_PSEUDO = 7, & !< pseudopotential
52 species_pspio = 110
53
54 type, extends(species_t) :: pseudopotential_t
55 private
56
57 integer :: type
58 logical :: nlcc
59
60 type(ps_t), allocatable, public :: ps
61
62 integer :: user_lmax
63 integer :: user_llocal
64
65 integer, public :: pseudopotential_set_id
66 logical, public :: pseudopotential_set_initialized
67 type(pseudo_set_t), public :: pseudopotential_set
68
69 contains
70 procedure :: has_nlcc => pseudopotential_has_nlcc
71 procedure :: x_functional => pseudopotential_x_functional
72 procedure :: c_functional => pseudopotential_c_functional
73 procedure :: get_radius => pseudopotential_get_radius
74 procedure :: iwf_fix_qn => pseudopotential_iwf_fix_qn
75 procedure :: get_iwf_radius => pseudopotential_get_iwf_radius
76 procedure :: is_local => pseudopotential_is_local
77 procedure :: debug => pseudopotential_debug
78 procedure :: build => pseudopotential_build
79 procedure :: init_potential => pseudopotential_init_potential
80 procedure :: get_user_lmax => pseudopotential_get_user_lmax
81 procedure :: get_user_lloc => pseudopotential_get_user_lloc
82 procedure :: set_user_lmax => pseudopotential_set_user_lmax
83 procedure :: set_user_lloc => pseudopotential_set_user_lloc
84 procedure :: is_ps => pseudopotential_is_ps
85 procedure :: is_ps_with_nlcc => pseudopotential_is_ps_with_nlcc
86 procedure :: represents_real_atom => pseudopotential_represents_real_atom
88 end type pseudopotential_t
89
90 interface pseudopotential_t
91 procedure pseudopotential_constructor
92 end interface pseudopotential_t
93
94contains
95
96
97 ! ---------------------------------------------------------
102 function pseudopotential_constructor(label, index) result(spec)
103 class(pseudopotential_t), pointer :: spec
104 character(len=*), intent(in) :: label
105 integer, intent(in) :: index
106
108
109 safe_allocate(spec)
110
111 call species_init(spec, label, index)
112
113 spec%nlcc = .false.
115 spec%user_lmax = invalid_l
116 spec%user_llocal = invalid_l
117
118 spec%type = 0
119
120 spec%pseudopotential_set_id = option__pseudopotentialset__none
121 spec%pseudopotential_set_initialized = .false.
122 call pseudo_set_nullify(spec%pseudopotential_set)
123
125 end function pseudopotential_constructor
126
127
128 ! ---------------------------------------------------------
129 subroutine pseudopotential_finalize(spec)
130 type(pseudopotential_t), intent(inout) :: spec
131
133
134 if (spec%pseudopotential_set_initialized) then
135 call pseudo_set_end(spec%pseudopotential_set)
136 spec%pseudopotential_set_initialized = .false.
137 end if
138
139 if (allocated(spec%ps)) call ps_end(spec%ps)
140 safe_deallocate_a(spec%ps)
141
142 call species_end(spec)
145 end subroutine pseudopotential_finalize
146
147 ! ---------------------------------------------------------
148 logical pure function pseudopotential_has_nlcc(spec)
149 class(pseudopotential_t), intent(in) :: spec
150 pseudopotential_has_nlcc = spec%nlcc
152
154 ! ---------------------------------------------------------
155 integer pure function pseudopotential_x_functional(spec)
156 class(pseudopotential_t), intent(in) :: spec
157
158 pseudopotential_x_functional = spec%ps%exchange_functional
160 ! if we do not know, try the pseudpotential set
161 if (pseudopotential_x_functional == pseudo_exchange_unknown) then
162 select case (spec%pseudopotential_set_id)
163 case ( &
164 option__pseudopotentialset__standard, &
165 option__pseudopotentialset__hgh_lda, &
166 option__pseudopotentialset__hgh_lda_sc, &
167 option__pseudopotentialset__hscv_lda)
169 pseudopotential_x_functional = option__xcfunctional__lda_x
171 case (option__pseudopotentialset__hscv_pbe)
172 pseudopotential_x_functional = option__xcfunctional__gga_x_pbe
173 end select
174 end if
178 ! ---------------------------------------------------------
180 integer pure function pseudopotential_c_functional(spec)
181 class(pseudopotential_t), intent(in) :: spec
182
183 pseudopotential_c_functional = spec%ps%correlation_functional
184
185 ! if we do not know, try the pseudpotential set
186 if (pseudopotential_c_functional == pseudo_correlation_unknown) then
187 select case (spec%pseudopotential_set_id)
188 case ( &
189 option__pseudopotentialset__standard, &
190 option__pseudopotentialset__hgh_lda, &
191 option__pseudopotentialset__hgh_lda_sc, &
192 option__pseudopotentialset__hscv_lda)
193
194 pseudopotential_c_functional = option__xcfunctional__lda_c_pz_mod/1000
196 case (option__pseudopotentialset__hscv_pbe)
197 pseudopotential_c_functional = option__xcfunctional__gga_c_pbe/1000
198 end select
199 end if
200
202
203 ! ---------------------------------------------------------
205 real(real64) pure function pseudopotential_get_radius(spec) result(radius)
206 class(pseudopotential_t), intent(in) :: spec
207
208 radius = spec%ps%rc_max
209 end function pseudopotential_get_radius
210
211 ! ---------------------------------------------------------
212 integer pure function pseudopotential_get_user_lloc(spec) result(lloc)
213 class(pseudopotential_t), intent(in) :: spec
214 lloc = spec%user_llocal
216
217 ! ---------------------------------------------------------
218 integer pure function pseudopotential_get_user_lmax(spec) result(lmax)
219 class(pseudopotential_t), intent(in) :: spec
220 lmax = spec%user_lmax
223 ! ---------------------------------------------------------
224 pure subroutine pseudopotential_set_user_lmax(spec, ll)
225 class(pseudopotential_t), intent(inout) :: spec
226 integer, intent(in) :: ll
227 spec%user_lmax = ll
228 end subroutine pseudopotential_set_user_lmax
229
230 ! ---------------------------------------------------------
231 pure subroutine pseudopotential_set_user_lloc(spec, ll)
232 class(pseudopotential_t), intent(inout) :: spec
233 integer, intent(in) :: ll
234 spec%user_llocal = ll
235 end subroutine pseudopotential_set_user_lloc
236
237 ! ---------------------------------------------------------
238
239 character(len=MAX_PATH_LEN) function get_set_directory(set_id) result(filename)
240 integer, intent(in) :: set_id
242 push_sub(get_set_directory)
243
244 select case (set_id)
245 case (option__pseudopotentialset__standard)
246 filename = trim(conf%share)//'/pseudopotentials/PSF'
247 case (option__pseudopotentialset__sg15)
248 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/sg15/'
249 case (option__pseudopotentialset__hgh_lda)
250 filename = trim(conf%share)//'/pseudopotentials/HGH/lda/'
251 case (option__pseudopotentialset__hgh_lda_sc)
252 filename = trim(conf%share)//'/pseudopotentials/HGH/lda_sc/'
253 case (option__pseudopotentialset__hscv_lda)
254 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/hscv/lda/'
255 case (option__pseudopotentialset__hscv_pbe)
256 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/hscv/pbe/'
257 case (option__pseudopotentialset__pseudodojo_lda)
258 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-04_pw_standard/'
259 case (option__pseudopotentialset__pseudodojo_pbe)
260 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-04_pbe_standard/'
261 case (option__pseudopotentialset__pseudodojo_pbesol)
262 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-04_pbesol_standard/'
263 case (option__pseudopotentialset__none)
264 filename = ''
265 case default
266 assert(.false.)
267 end select
268
269 pop_sub(get_set_directory)
270 end function get_set_directory
271
272 ! ---------------------------------------------------------
274 subroutine read_from_set(spec, set_id, set, read_data)
275 type(pseudopotential_t), intent(inout) :: spec
276 integer, intent(in) :: set_id
277 type(pseudo_set_t), intent(in) :: set
278 integer, intent(out) :: read_data
279
280 type(element_t) :: el
281
282 push_sub(read_from_set)
283
284 spec%pseudopotential_set_id = set_id
285 spec%pseudopotential_set = set
286
287 call element_init(el, get_symbol(spec%get_label()))
288
289 if (spec%pseudopotential_set_id /= option__pseudopotentialset__none .and. pseudo_set_has(spec%pseudopotential_set, el)) then
290 call spec%set_filename(pseudo_set_file_path(spec%pseudopotential_set, el))
291
292 ! these might have been set before
293 if (spec%get_z() < 0) call spec%set_z(real(element_atomic_number(el), real64))
294 if (spec%user_lmax == invalid_l) spec%user_lmax = pseudo_set_lmax(spec%pseudopotential_set, el)
295 if (spec%user_llocal == invalid_l) spec%user_llocal = pseudo_set_llocal(spec%pseudopotential_set, el)
296 if (spec%get_mass() < 0) call spec%set_mass(element_mass(el))
297 if (spec%get_vdw_radius() < 0) call spec%set_vdw_radius(element_vdw_radius(el))
298 read_data = 8
299 else
300 read_data = 0
301 end if
302
303 call element_end(el)
304
306 end subroutine read_from_set
307
308
309 ! ---------------------------------------------------------
310 subroutine read_from_default_file(iunit, read_data, spec)
311 integer, intent(in) :: iunit
312 integer, intent(inout) :: read_data
313 class(pseudopotential_t), intent(inout) :: spec
314
315 character(len=LABEL_LEN) :: label
316 character(len=MAX_PATH_LEN) :: filename
317 type(element_t) :: element
318 integer :: lmax, llocal
319 real(real64) :: zz
320
321 push_sub(read_from_default_file)
322
323 backspace(iunit)
325 read(iunit,*) label, filename, zz, lmax, llocal
326
327 call spec%set_filename(trim(conf%share)//'/pseudopotentials/'//trim(filename))
328
329 assert(trim(label) == trim(spec%get_label()))
330
331 read_data = 8
333 ! get the mass, vdw radius and atomic number for this element
334 call element_init(element, get_symbol(label))
335
336 assert(element_valid(element))
337
338 ! these might have been set before
339 if (spec%get_z() < 0) call spec%set_z(zz)
340 if (spec%get_z() < 0) call spec%set_z(real(element_atomic_number(element), real64))
341 if (spec%user_lmax == invalid_l) spec%user_lmax = lmax
342 if (spec%user_llocal == invalid_l) spec%user_llocal = llocal
343 if (spec%get_mass() < 0) call spec%set_mass(element_mass(element))
344 if (spec%get_vdw_radius() < 0) call spec%set_vdw_radius(element_vdw_radius(element))
345
346 call element_end(element)
347
349 end subroutine read_from_default_file
350
351 ! ---------------------------------------------------------
354 subroutine pseudopotential_real_nl_projector(spec, np, x, r, l, lm, i, uV)
355 class(pseudopotential_t), intent(in) :: spec
356 integer, intent(in) :: np
357 real(real64), intent(in) :: x(:,:)
358 real(real64), intent(in) :: r(:)
359 integer, intent(in) :: l, lm, i
360 real(real64), intent(out) :: uv(:)
361
362 integer :: ip
363 real(real64) :: ylm
364
366
367 if (np > 0) then
368 uv(1:np) = r(1:np)
369 call spline_eval_vec(spec%ps%kb(l, i), np, uv)
370
371 do ip = 1, np
372 call ylmr_real(x(1:3, ip), l, lm, ylm)
373 uv(ip) = uv(ip) * ylm
374 end do
375 end if
376
379
380 ! ---------------------------------------------------------
383 subroutine pseudopotential_nl_projector(spec, np, x, r, l, lm, i, uV)
384 class(pseudopotential_t), intent(in) :: spec
385 integer, intent(in) :: np
386 real(real64), intent(in) :: x(:,:)
387 real(real64), intent(in) :: r(:)
388 integer, intent(in) :: l, lm, i
389 complex(real64), intent(out) :: uv(:)
390
391 integer :: ip
392 complex(real64) :: ylm
393
395
396 if (np > 0) then
397 uv(1:np) = r(1:np)
398 call spline_eval_vec(spec%ps%kb(l, i), np, uv)
399
400 do ip = 1, np
401 call ylmr_cmplx(x(1:3, ip), l, lm, ylm)
402 uv(ip) = uv(ip) * ylm
403 end do
404 end if
405
407 end subroutine pseudopotential_nl_projector
408
409 ! ---------------------------------------------------------
411 subroutine pseudopotential_iwf_fix_qn(spec, namespace, nspin, dim)
412 class(pseudopotential_t), intent(inout) :: spec
413 type(namespace_t), intent(in) :: namespace
414 integer, intent(in) :: nspin
415 integer, intent(in) :: dim
416
417 integer :: is, n, i, l, m
418
420
421 do is = 1, nspin
422 n = 1
423 do i = 1, spec%ps%conf%p
424 if (n > spec%niwfs) exit
425 l = spec%ps%conf%l(i)
426
427 if (.not. spec%ps%bound(i,is)) cycle
428
429 do m = -l, l
430 spec%iwf_i(n, is) = i
431 spec%iwf_n(n, is) = spec%ps%conf%n(i)
432 spec%iwf_l(n, is) = l
433 spec%iwf_m(n, is) = m
434 spec%iwf_j(n) = spec%ps%conf%j(i)
435 n = n + 1
436 end do
437
438 end do
439 end do
440
442 end subroutine pseudopotential_iwf_fix_qn
443
444 ! ---------------------------------------------------------
446 real(real64) function pseudopotential_get_iwf_radius(spec, ii, is, threshold) result(radius)
447 class(pseudopotential_t), intent(in) :: spec
448 integer, intent(in) :: ii
449 integer, intent(in) :: is
450 real(real64), optional, intent(in) :: threshold
451
452 real(real64) threshold_
453
455
456 threshold_ = optional_default(threshold, spec%ps%projectors_sphere_threshold)
457 assert(ii <= spec%ps%conf%p)
458 radius = spline_x_threshold(spec%ps%ur(ii, is), threshold_)
459
462
463 ! ---------------------------------------------------------
464 logical function pseudopotential_is_local(spec) result(is_local)
465 class(pseudopotential_t), intent(in) :: spec
466
468
469 is_local = .false.
470 if (spec%ps%lmax == 0 .and. spec%ps%llocal == 0) is_local = .true.
471
473 end function pseudopotential_is_local
474
475 ! ---------------------------------------------------------
479 ! ---------------------------------------------------------
480 subroutine pseudopotential_init_potential(this, namespace, grid_cutoff, filter)
481 class(pseudopotential_t), intent(inout) :: this
482 type(namespace_t), intent(in) :: namespace
483 real(real64), intent(in) :: grid_cutoff
484 integer, intent(in) :: filter
485
486 character(len=256) :: dirname
487 integer :: iorb
488 real(real64) :: local_radius, orbital_radius
489
491
492 call ps_separate(this%ps)
493
494 call ps_getradius(this%ps)
495
496 if (filter /= ps_filter_none .and. this%ps%projector_type /= proj_hgh) then
497 call ps_filter(this%ps, filter, grid_cutoff)
498 call ps_getradius(this%ps) ! radius may have changed
499 end if
500
501 call ps_derivatives(this%ps)
502
503 local_radius = this%ps%vl%x_threshold
505 orbital_radius = m_zero
506 ! FIXME: should take max over spins too here.
507 do iorb = 1, this%get_niwfs()
508 orbital_radius = max(orbital_radius, this%get_iwf_radius(this%iwf_i(iorb, 1), is = 1))
509 end do
510
511 call messages_write('Info: Pseudopotential for '//trim(this%get_label()), new_line = .true.)
512 call messages_write(' Radii for localized parts:', new_line = .true.)
513 call messages_write(' local part = ')
514 call messages_write(local_radius, fmt = 'f5.1', units = units_out%length, new_line = .true.)
515 call messages_write(' non-local part = ')
516 call messages_write(this%ps%rc_max, fmt = 'f5.1', units = units_out%length, new_line = .true.)
517 call messages_write(' orbitals = ')
518 call messages_write(orbital_radius, fmt = 'f5.1', units = units_out%length, new_line = .true.)
519 call messages_info(namespace=namespace)
520
521 if (max(local_radius, this%ps%rc_max) > 6.0_real64) then
522 call messages_write("One of the radii of your pseudopotential's localized parts seems", new_line = .true.)
523 call messages_write("unusually large; check that your pseudopotential is correct.")
524 call messages_warning(namespace=namespace)
525 end if
526
527 if (orbital_radius > 20.0_real64) then
528 call messages_write("The radius of the atomic orbitals given by your pseudopotential seems", new_line = .true.)
529 call messages_write("unusually large; check that your pseudopotential is correct.")
530 call messages_warning(namespace=namespace)
531 end if
532
533 if (debug%info) then
534 write(dirname, '(a)') 'debug/geometry'
535 call io_mkdir(dirname, namespace)
536 call this%debug(trim(dirname), namespace, grid_cutoff)
537 end if
538
540 end subroutine pseudopotential_init_potential
541
542 ! ---------------------------------------------------------
543 subroutine pseudopotential_debug(spec, dir, namespace, gmax)
544 class(pseudopotential_t), intent(in) :: spec
545 character(len=*), intent(in) :: dir
546 type(namespace_t), intent(in) :: namespace
547 real(real64), intent(in) :: gmax
548
549
550 character(len=256) :: dirname
551 integer :: iunit
552
553 if (.not. mpi_grp_is_root(mpi_world)) then
554 return
555 end if
556
558
559 dirname = trim(dir)//'/'//trim(spec%get_label())
560
561 call io_mkdir(dirname, namespace)
562
563 iunit = io_open(trim(dirname)//'/info', namespace, action='write')
564
565 write(iunit, '(a,i3)') 'Index = ', spec%get_index()
566 write(iunit, '(2a)') 'Label = ', trim(spec%get_label())
567 !write(iunit, '(a,i3)') 'Type = ', spec%type
568 write(iunit, '(a,f15.2)') 'z = ', spec%get_z()
569 write(iunit, '(a,f15.2)') 'z_val = ', spec%get_zval()
570 write(iunit, '(a,f15.2)') 'mass = ', spec%get_mass()
571 write(iunit, '(a,f15.2)') 'vdw_radius = ', spec%get_vdw_radius()
572 write(iunit, '(a,l1)') 'local = ', spec%is_local()
573 write(iunit, '(a,l1)') 'nlcc = ', spec%nlcc
574 write(iunit, '(a,i3)') 'hubbard_l = ', spec%get_hubbard_l()
575 write(iunit, '(a,f15.2)') 'hubbard_U = ', spec%get_hubbard_U()
576 write(iunit, '(a,f15.2)') 'hubbard_j = ', spec%get_hubbard_j()
577 write(iunit, '(a,f15.2)') 'hubbard_alpha = ', spec%get_hubbard_alpha()
578
579 if (debug%info) call ps_debug(spec%ps, trim(dirname), namespace, gmax)
580
581 call io_close(iunit)
582 pop_sub(pseudopotential_debug)
583 end subroutine pseudopotential_debug
584
585 ! ---------------------------------------------------------
586 subroutine pseudopotential_build(spec, namespace, ispin, dim, print_info)
587 class(pseudopotential_t), intent(inout) :: spec
588 type(namespace_t), intent(in) :: namespace
589 integer, intent(in) :: ispin
590 integer, intent(in) :: dim
591 logical, optional, intent(in) :: print_info
592
593 logical :: print_info_
594
595 push_sub(pseudopotential_build)
596
597 print_info_ = optional_default(print_info, .true.)
598
599 ! masses are always in amu, so convert them to a.u.
600 call spec%set_mass(units_to_atomic(unit_amu, spec%get_mass()))
601
602 spec%has_density = .false.
603
604 ! allocate structure
605 safe_allocate(spec%ps)
606 if (spec%type == species_pspio) then
607 call ps_pspio_init(spec%ps, namespace, spec%get_label(), spec%get_z(), spec%user_lmax, &
608 ispin, spec%get_filename())
609 else
610 call ps_init(spec%ps, namespace, spec%get_label(), spec%get_z(), spec%user_lmax, &
611 spec%user_llocal, ispin, spec%get_filename())
612 end if
613 call spec%set_zval(spec%ps%z_val)
614 spec%nlcc = spec%ps%nlcc
615 spec%niwfs = ps_bound_niwfs(spec%ps)
616
617 ! invalidate these variables as they should not be used after
618 spec%user_lmax = invalid_l
619 spec%user_llocal = invalid_l
620
621 safe_allocate(spec%iwf_n(1:spec%niwfs, 1:ispin))
622 safe_allocate(spec%iwf_l(1:spec%niwfs, 1:ispin))
623 safe_allocate(spec%iwf_m(1:spec%niwfs, 1:ispin))
624 safe_allocate(spec%iwf_i(1:spec%niwfs, 1:ispin))
625 safe_allocate(spec%iwf_j(1:spec%niwfs))
626
627 call spec%iwf_fix_qn(namespace, ispin, dim)
628
629 pop_sub(pseudopotential_build)
630 end subroutine pseudopotential_build
631
632 ! ---------------------------------------------------------
634 logical pure function pseudopotential_is_ps(this)
635 class(pseudopotential_t), intent(in) :: this
638 end function pseudopotential_is_ps
639
640 ! ---------------------------------------------------------
642 logical pure function pseudopotential_is_ps_with_nlcc(this)
643 class(pseudopotential_t), intent(in) :: this
644
645 pseudopotential_is_ps_with_nlcc = this%has_nlcc()
647
648 ! ---------------------------------------------------------
650 logical pure function pseudopotential_represents_real_atom(spec)
651 class(pseudopotential_t), intent(in) :: spec
652
655
656
657
658end module pseudopotential_oct_m
659
660!! Local Variables:
661!! mode: f90
662!! coding: utf-8
663!! End:
Delete the C++ object.
Definition: pseudo_set.F90:152
Nullify the C++ pointer.
Definition: pseudo_set.F90:142
Definition: io.F90:114
This module is intended to contain "only mathematical" functions and procedures.
Definition: math.F90:115
Definition: ps.F90:114
subroutine, public ps_end(ps)
Definition: ps.F90:1048
integer, parameter, public invalid_l
Definition: ps.F90:176
real(real64) pure function pseudopotential_get_radius(spec)
Return radius of the pseudopotential if this is a pseudo, zero otherwise.
subroutine pseudopotential_build(spec, namespace, ispin, dim, print_info)
subroutine, public pseudopotential_nl_projector(spec, np, x, r, l, lm, i, uV)
This routine returns the non-local projector, built using spherical harmonics.
logical pure function pseudopotential_has_nlcc(spec)
integer pure function pseudopotential_get_user_lmax(spec)
logical pure function pseudopotential_is_ps_with_nlcc(this)
Is the species a pseudopotential derived class or not with nlcc.
subroutine pseudopotential_iwf_fix_qn(spec, namespace, nspin, dim)
set up quantum numbers of orbitals
subroutine pseudopotential_finalize(spec)
real(real64) function pseudopotential_get_iwf_radius(spec, ii, is, threshold)
Return radius outside which orbital is less than threshold value 0.001.
character(len=max_path_len) function, public get_set_directory(set_id)
subroutine, public read_from_default_file(iunit, read_data, spec)
subroutine, public read_from_set(spec, set_id, set, read_data)
Creates a pseudopotential type from a set.
logical pure function pseudopotential_represents_real_atom(spec)
Is the species representing an atomic species or not.
logical function pseudopotential_is_local(spec)
integer pure function pseudopotential_x_functional(spec)
subroutine pseudopotential_init_potential(this, namespace, grid_cutoff, filter)
This routine performs some operations on the pseudopotential functions (filtering,...
integer pure function pseudopotential_c_functional(spec)
logical pure function pseudopotential_is_ps(this)
Is the species a pseudopotential derived class or not.
integer pure function pseudopotential_get_user_lloc(spec)
pure subroutine pseudopotential_set_user_lloc(spec, ll)
pure subroutine pseudopotential_set_user_lmax(spec, ll)
subroutine, public pseudopotential_real_nl_projector(spec, np, x, r, l, lm, i, uV)
This routine returns the non-local projector and its derivative, built using real spherical harmonics...
subroutine pseudopotential_debug(spec, dir, namespace, gmax)
class(pseudopotential_t) function, pointer pseudopotential_constructor(label, index)
The factory routine (or constructor) allocates a pointer of the corresponding type and then calls the...
integer, parameter, public species_pspio
pseudopotential parsed by pspio library
subroutine, public species_end(species)
Definition: species.F90:498
subroutine, public species_init(this, label, index)
Initializes a species object. This should be the first routine to be called (before species_read and ...
Definition: species.F90:287
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:132
This module defines the unit system, used for input and output.
An abstract class for species. Derived classes include jellium, all electron, and pseudopotential spe...
Definition: species.F90:143
int true(void)