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
27 use math_oct_m
29 use mpi_oct_m
32 use ps_oct_m
33 use pseudo_oct_m
37 use unit_oct_m
39
40 implicit none
41
42 private
43 public :: &
50
51 integer, public, parameter :: &
52 SPECIES_PSEUDO = 7, & !< pseudopotential
53 species_pspio = 110
54
55 type, extends(species_t) :: pseudopotential_t
56 private
57
58 integer :: type
59 logical :: nlcc
60
61 type(ps_t), allocatable, public :: ps
62
63 integer :: user_lmax
64 integer :: user_llocal
65
66 integer, public :: pseudopotential_set_id
67 logical, public :: pseudopotential_set_initialized
68 type(pseudo_set_t), public :: pseudopotential_set
69
70 contains
71 procedure :: has_nlcc => pseudopotential_has_nlcc
72 procedure :: x_functional => pseudopotential_x_functional
73 procedure :: c_functional => pseudopotential_c_functional
74 procedure :: get_radius => pseudopotential_get_radius
75 procedure :: iwf_fix_qn => pseudopotential_iwf_fix_qn
76 procedure :: get_iwf_radius => pseudopotential_get_iwf_radius
77 procedure :: is_local => pseudopotential_is_local
78 procedure :: debug => pseudopotential_debug
79 procedure :: build => pseudopotential_build
80 procedure :: init_potential => pseudopotential_init_potential
81 procedure :: get_user_lmax => pseudopotential_get_user_lmax
82 procedure :: get_user_lloc => pseudopotential_get_user_lloc
83 procedure :: set_user_lmax => pseudopotential_set_user_lmax
84 procedure :: set_user_lloc => pseudopotential_set_user_lloc
85 procedure :: is_ps => pseudopotential_is_ps
86 procedure :: is_ps_with_nlcc => pseudopotential_is_ps_with_nlcc
87 procedure :: is_ultrasoft => pseudopotential_is_ultrasoft
88 procedure :: is_paw => pseudopotential_is_paw
89 procedure :: requires_generalized_overlap => pseudopotential_requires_generalized_overlap
90 procedure :: represents_real_atom => pseudopotential_represents_real_atom
92 end type pseudopotential_t
94 interface pseudopotential_t
95 procedure pseudopotential_constructor
96 end interface pseudopotential_t
97
98contains
99
100
101 ! ---------------------------------------------------------
106 function pseudopotential_constructor(label, index) result(spec)
107 class(pseudopotential_t), pointer :: spec
108 character(len=*), intent(in) :: label
109 integer, intent(in) :: index
110
112
113 safe_allocate(spec)
114
115 call species_init(spec, label, index)
116
117 spec%nlcc = .false.
118
119 spec%user_lmax = invalid_l
120 spec%user_llocal = invalid_l
121
122 spec%type = 0
124 spec%pseudopotential_set_id = option__pseudopotentialset__none
125 spec%pseudopotential_set_initialized = .false.
126 call pseudo_set_nullify(spec%pseudopotential_set)
129 end function pseudopotential_constructor
132 ! ---------------------------------------------------------
134 type(pseudopotential_t), intent(inout) :: spec
137
138 if (spec%pseudopotential_set_initialized) then
139 call pseudo_set_end(spec%pseudopotential_set)
140 spec%pseudopotential_set_initialized = .false.
141 end if
142
143 if (allocated(spec%ps)) call ps_end(spec%ps)
144 safe_deallocate_a(spec%ps)
146 call species_end(spec)
151 ! ---------------------------------------------------------
152 logical pure function pseudopotential_has_nlcc(spec)
153 class(pseudopotential_t), intent(in) :: spec
157 ! ---------------------------------------------------------
158 logical pure function pseudopotential_is_ultrasoft(spec) result(is_ultrasoft)
159 class(pseudopotential_t), intent(in) :: spec
161 is_ultrasoft = allocated(spec%ps) .and. ps_is_ultrasoft(spec%ps)
164 ! ---------------------------------------------------------
165 logical pure function pseudopotential_is_paw(spec) result(is_paw)
166 class(pseudopotential_t), intent(in) :: spec
167
168 is_paw = allocated(spec%ps) .and. ps_is_paw(spec%ps)
169 end function pseudopotential_is_paw
170
171 ! ---------------------------------------------------------
172 logical pure function pseudopotential_requires_generalized_overlap(spec) result(requires_generalized_overlap)
173 class(pseudopotential_t), intent(in) :: spec
174
175 requires_generalized_overlap = allocated(spec%ps) .and. ps_requires_generalized_overlap(spec%ps)
177
179 ! ---------------------------------------------------------
180 integer pure function pseudopotential_x_functional(spec)
181 class(pseudopotential_t), intent(in) :: spec
182
183 pseudopotential_x_functional = spec%ps%exchange_functional
184
185 ! if we do not know, try the pseudpotential set
186 if (pseudopotential_x_functional == pseudo_exchange_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__gbrv_lda, &
193 option__pseudopotentialset__hscv_lda)
194
195 pseudopotential_x_functional = option__xcfunctional__lda_x
196
197 case (option__pseudopotentialset__hscv_pbe)
198 pseudopotential_x_functional = option__xcfunctional__gga_x_pbe
199 end select
200 end if
201
203
204 ! ---------------------------------------------------------
206 integer pure function pseudopotential_c_functional(spec)
207 class(pseudopotential_t), intent(in) :: spec
208
209 pseudopotential_c_functional = spec%ps%correlation_functional
210
211 ! if we do not know, try the pseudpotential set
212 if (pseudopotential_c_functional == pseudo_correlation_unknown) then
213 select case (spec%pseudopotential_set_id)
214 case ( &
215 option__pseudopotentialset__standard, &
216 option__pseudopotentialset__hgh_lda, &
217 option__pseudopotentialset__hgh_lda_sc, &
218 option__pseudopotentialset__gbrv_lda, &
219 option__pseudopotentialset__hscv_lda)
220
221 pseudopotential_c_functional = option__xcfunctional__lda_c_pz_mod/species_libxc_c_index
222
223 case (option__pseudopotentialset__hscv_pbe)
224 pseudopotential_c_functional = option__xcfunctional__gga_c_pbe/species_libxc_c_index
225 end select
226 end if
227
229
230 ! ---------------------------------------------------------
232 real(real64) pure function pseudopotential_get_radius(spec) result(radius)
233 class(pseudopotential_t), intent(in) :: spec
234
235 radius = spec%ps%rc_max
236 end function pseudopotential_get_radius
238 ! ---------------------------------------------------------
239 integer pure function pseudopotential_get_user_lloc(spec) result(lloc)
240 class(pseudopotential_t), intent(in) :: spec
241 lloc = spec%user_llocal
243
244 ! ---------------------------------------------------------
245 integer pure function pseudopotential_get_user_lmax(spec) result(lmax)
246 class(pseudopotential_t), intent(in) :: spec
247 lmax = spec%user_lmax
249
250 ! ---------------------------------------------------------
251 pure subroutine pseudopotential_set_user_lmax(spec, ll)
252 class(pseudopotential_t), intent(inout) :: spec
253 integer, intent(in) :: ll
254 spec%user_lmax = ll
255 end subroutine pseudopotential_set_user_lmax
256
257 ! ---------------------------------------------------------
258 pure subroutine pseudopotential_set_user_lloc(spec, ll)
259 class(pseudopotential_t), intent(inout) :: spec
260 integer, intent(in) :: ll
261 spec%user_llocal = ll
262 end subroutine pseudopotential_set_user_lloc
263
264 ! ---------------------------------------------------------
265
266 character(len=MAX_PATH_LEN) function get_set_directory(set_id) result(filename)
267 integer, intent(in) :: set_id
268
269 push_sub(get_set_directory)
270
271 select case (set_id)
272 case (option__pseudopotentialset__standard)
273 filename = trim(conf%share)//'/pseudopotentials/PSF'
274 case (option__pseudopotentialset__sg15)
275 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/sg15/'
276 case (option__pseudopotentialset__hgh_lda)
277 filename = trim(conf%share)//'/pseudopotentials/HGH/lda/'
278 case (option__pseudopotentialset__hgh_lda_sc)
279 filename = trim(conf%share)//'/pseudopotentials/HGH/lda_sc/'
280 case (option__pseudopotentialset__hscv_lda)
281 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/hscv/lda/'
282 case (option__pseudopotentialset__hscv_pbe)
283 filename = trim(conf%share)//'/pseudopotentials/quantum-simulation.org/hscv/pbe/'
284 case (option__pseudopotentialset__gbrv_lda)
285 filename = trim(conf%share)//'/pseudopotentials/gbrv/lda/'
286 case (option__pseudopotentialset__pseudodojo_lda)
287 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-04_pw_standard/'
288 case (option__pseudopotentialset__pseudodojo_pbe)
289 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-05_pbe_standard/'
290 case (option__pseudopotentialset__pseudodojo_pbesol)
291 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-sr-04_pbesol_standard/'
292 case (option__pseudopotentialset__pseudodojo_pbe_fr)
293 filename = trim(conf%share)//'/pseudopotentials/pseudo-dojo.org/nc-fr-04_pbe_standard/'
294 case (option__pseudopotentialset__none)
295 filename = ''
296 case default
297 assert(.false.)
298 end select
299
300 pop_sub(get_set_directory)
301 end function get_set_directory
302
303 ! ---------------------------------------------------------
305 subroutine read_from_set(spec, set_id, set, read_data)
306 type(pseudopotential_t), intent(inout) :: spec
307 integer, intent(in) :: set_id
308 type(pseudo_set_t), intent(in) :: set
309 integer, intent(out) :: read_data
310
311 type(element_t) :: el
312
313 push_sub(read_from_set)
314
315 spec%pseudopotential_set_id = set_id
316 spec%pseudopotential_set = set
318 call element_init(el, get_symbol(spec%get_label()))
319
320 if (spec%pseudopotential_set_id /= option__pseudopotentialset__none .and. pseudo_set_has(spec%pseudopotential_set, el)) then
321 call spec%set_filename(pseudo_set_file_path(spec%pseudopotential_set, el))
322
323 ! these might have been set before
324 if (spec%get_z() < 0) call spec%set_z(real(element_atomic_number(el), real64))
325 if (spec%user_lmax == invalid_l) spec%user_lmax = pseudo_set_lmax(spec%pseudopotential_set, el)
326 if (spec%user_llocal == invalid_l) spec%user_llocal = pseudo_set_llocal(spec%pseudopotential_set, el)
327 if (spec%get_mass() < 0) call spec%set_mass(element_mass(el))
328 if (spec%get_vdw_radius() < 0) call spec%set_vdw_radius(element_vdw_radius(el))
329 read_data = 8
330 else
331 read_data = 0
332 end if
333
334 call element_end(el)
335
336 pop_sub(read_from_set)
337 end subroutine read_from_set
339
340 ! ---------------------------------------------------------
341 subroutine read_from_default_file(iunit, read_data, spec)
342 integer, intent(in) :: iunit
343 integer, intent(inout) :: read_data
344 class(pseudopotential_t), intent(inout) :: spec
345
346 character(len=LABEL_LEN) :: label
347 character(len=MAX_PATH_LEN) :: filename
348 type(element_t) :: element
349 integer :: lmax, llocal
350 real(real64) :: zz
351
352 push_sub(read_from_default_file)
353
354 backspace(iunit)
355
356 read(iunit,*) label, filename, zz, lmax, llocal
357
358 call spec%set_filename(trim(conf%share)//'/pseudopotentials/'//trim(filename))
359
360 assert(trim(label) == trim(spec%get_label()))
361
362 read_data = 8
363
364 ! get the mass, vdw radius and atomic number for this element
365 call element_init(element, get_symbol(label))
366
367 assert(element_valid(element))
368
369 ! these might have been set before
370 if (spec%get_z() < 0) call spec%set_z(zz)
371 if (spec%get_z() < 0) call spec%set_z(real(element_atomic_number(element), real64))
372 if (spec%user_lmax == invalid_l) spec%user_lmax = lmax
373 if (spec%user_llocal == invalid_l) spec%user_llocal = llocal
374 if (spec%get_mass() < 0) call spec%set_mass(element_mass(element))
375 if (spec%get_vdw_radius() < 0) call spec%set_vdw_radius(element_vdw_radius(element))
376
377 call element_end(element)
378
380 end subroutine read_from_default_file
381
382 ! ---------------------------------------------------------
385 subroutine pseudopotential_real_nl_projector(spec, np, x, r, l, lm, i, uV)
386 class(pseudopotential_t), intent(in) :: spec
387 integer, intent(in) :: np
388 real(real64), contiguous, intent(in) :: x(:,:)
389 real(real64), contiguous, intent(in) :: r(:)
390 integer, intent(in) :: l, lm, i
391 real(real64), contiguous, intent(out) :: uv(:)
392
393 integer :: ip
394 real(real64) :: ylm
395
397
398 do ip = 1, np
399 if (r(ip) <= spec%ps%kb(l, i)%x_threshold) then
400 uv(ip) = spline_eval(spec%ps%kb(l, i), r(ip))
401 call ylmr_real(x(1:3, ip), l, lm, ylm)
402 uv(ip) = uv(ip) * ylm
403 else
404 uv(ip) = m_zero
405 end if
406 end do
407
410
411 ! ---------------------------------------------------------
414 subroutine pseudopotential_nl_projector(spec, np, x, r, l, lm, i, uV)
415 class(pseudopotential_t), intent(in) :: spec
416 integer, intent(in) :: np
417 real(real64), contiguous, intent(in) :: x(:,:)
418 real(real64), contiguous, intent(in) :: r(:)
419 integer, intent(in) :: l, lm, i
420 complex(real64), contiguous, intent(out) :: uv(:)
421
422 integer :: ip
423 complex(real64) :: ylm
424
426
427 do ip = 1, np
428 if (r(ip) <= spec%ps%kb(l, i)%x_threshold) then
429 uv(ip) = spline_eval(spec%ps%kb(l, i), r(ip))
430 call ylmr_cmplx(x(1:3, ip), l, lm, ylm)
431 uv(ip) = uv(ip) * ylm
432 else
433 uv(ip) = m_zero
434 end if
435 end do
436
438 end subroutine pseudopotential_nl_projector
439
440 ! ---------------------------------------------------------
442 subroutine pseudopotential_iwf_fix_qn(spec, namespace, nspin, dim)
443 class(pseudopotential_t), intent(inout) :: spec
444 type(namespace_t), intent(in) :: namespace
445 integer, intent(in) :: nspin
446 integer, intent(in) :: dim
447
448 integer :: is, n, i, l, m
449
451
452 do is = 1, nspin
453 n = 1
454 do i = 1, spec%ps%conf%p
455 if (n > spec%niwfs) exit
456 l = spec%ps%conf%l(i)
458 if (.not. spec%ps%bound(i,is)) cycle
459
460 do m = -l, l
461 spec%iwf_i(n, is) = i
462 spec%iwf_n(n, is) = spec%ps%conf%n(i)
463 spec%iwf_l(n, is) = l
464 spec%iwf_m(n, is) = m
465 spec%iwf_j(n) = spec%ps%conf%j(i)
466 n = n + 1
467 end do
468
469 end do
470 end do
471
473 end subroutine pseudopotential_iwf_fix_qn
474
475 ! ---------------------------------------------------------
477 real(real64) function pseudopotential_get_iwf_radius(spec, ii, is, threshold) result(radius)
478 class(pseudopotential_t), intent(in) :: spec
479 integer, intent(in) :: ii
480 integer, intent(in) :: is
481 real(real64), optional, intent(in) :: threshold
482
483 real(real64) threshold_
484
487 threshold_ = optional_default(threshold, spec%ps%projectors_sphere_threshold)
488 assert(ii <= spec%ps%conf%p)
489 radius = spline_x_threshold(spec%ps%ur(ii, is), threshold_)
490
493
494 ! ---------------------------------------------------------
495 logical function pseudopotential_is_local(spec) result(is_local)
496 class(pseudopotential_t), intent(in) :: spec
497
499
500 is_local = .false.
501 if (spec%ps%lmax == 0 .and. spec%ps%llocal == 0) is_local = .true.
502
504 end function pseudopotential_is_local
505
506 ! ---------------------------------------------------------
510 ! ---------------------------------------------------------
511 subroutine pseudopotential_init_potential(this, namespace, grid_cutoff, filter)
512 class(pseudopotential_t), intent(inout) :: this
513 type(namespace_t), intent(in) :: namespace
514 real(real64), intent(in) :: grid_cutoff
515 integer, intent(in) :: filter
516
517 character(len=256) :: dirname
518 integer :: iorb, ispin
519 real(real64) :: local_radius, orbital_radius
520
522
523 call ps_separate(this%ps)
524
525 call ps_getradius(this%ps)
526
527 if (filter /= ps_filter_none .and. this%ps%projector_type /= proj_hgh) then
528 call ps_filter(this%ps, filter, grid_cutoff)
529 call ps_getradius(this%ps) ! radius may have changed
530 end if
531
532 call ps_derivatives(this%ps)
533
534 local_radius = this%ps%vl%x_threshold
535
536 orbital_radius = m_zero
537 do iorb = 1, this%get_niwfs()
538 do ispin = 1, size(this%iwf_i, 2)
539 orbital_radius = max(orbital_radius, &
540 this%get_iwf_radius(this%iwf_i(iorb, ispin), is = ispin))
541 end do
542 end do
543
544 call messages_write('Info: Pseudopotential for '//trim(this%get_label()), new_line = .true.)
545 call messages_write(' Radii for localized parts:', new_line = .true.)
546 call messages_write(' local part = ')
547 call messages_write(local_radius, fmt = 'f5.1', units = units_out%length, new_line = .true.)
548 call messages_write(' non-local part = ')
549 call messages_write(this%ps%rc_max, fmt = 'f5.1', units = units_out%length, new_line = .true.)
550 call messages_write(' orbitals = ')
551 call messages_write(orbital_radius, fmt = 'f5.1', units = units_out%length, new_line = .true.)
552 call messages_info(namespace=namespace)
553
554 if (max(local_radius, this%ps%rc_max) > 6.0_real64) then
555 call messages_write("One of the radii of your pseudopotential's localized parts seems", new_line = .true.)
556 call messages_write("unusually large; check that your pseudopotential is correct.")
557 call messages_warning(namespace=namespace)
558 end if
559
560 if (orbital_radius > 20.0_real64) then
561 call messages_write("The radius of the atomic orbitals given by your pseudopotential seems", new_line = .true.)
562 call messages_write("unusually large; check that your pseudopotential is correct.")
563 call messages_warning(namespace=namespace)
564 end if
565
566 if (debug%info) then
567 write(dirname, '(a)') 'debug/geometry'
568 call io_mkdir(dirname, namespace)
569 call this%debug(trim(dirname), namespace, grid_cutoff)
570 end if
571
573 end subroutine pseudopotential_init_potential
574
575 ! ---------------------------------------------------------
576 subroutine pseudopotential_debug(spec, dir, namespace, gmax)
577 class(pseudopotential_t), intent(in) :: spec
578 character(len=*), intent(in) :: dir
579 type(namespace_t), intent(in) :: namespace
580 real(real64), intent(in) :: gmax
581
582
583 character(len=256) :: dirname
584 integer :: iunit
585
586 if (.not. mpi_world%is_root()) then
587 return
588 end if
589
590 push_sub(pseudopotential_debug)
591
592 dirname = trim(dir)//'/'//trim(spec%get_label())
593
594 call io_mkdir(dirname, namespace)
595
596 iunit = io_open(trim(dirname)//'/info', namespace, action='write')
597
598 write(iunit, '(a,i3)') 'Index = ', spec%get_index()
599 write(iunit, '(2a)') 'Label = ', trim(spec%get_label())
600 !write(iunit, '(a,i3)') 'Type = ', spec%type
601 write(iunit, '(a,f15.2)') 'z = ', spec%get_z()
602 write(iunit, '(a,f15.2)') 'z_val = ', spec%get_zval()
603 write(iunit, '(a,f15.2)') 'mass = ', spec%get_mass()
604 write(iunit, '(a,f15.2)') 'vdw_radius = ', spec%get_vdw_radius()
605 write(iunit, '(a,l1)') 'local = ', spec%is_local()
606 write(iunit, '(a,l1)') 'nlcc = ', spec%nlcc
607 write(iunit, '(a,i3)') 'hubbard_l = ', spec%get_hubbard_l()
608 write(iunit, '(a,f15.2)') 'hubbard_U = ', spec%get_hubbard_U()
609 write(iunit, '(a,f15.2)') 'hubbard_j = ', spec%get_hubbard_j()
610 write(iunit, '(a,f15.2)') 'hubbard_alpha = ', spec%get_hubbard_alpha()
611
612 if (debug%info) call ps_debug(spec%ps, trim(dirname), namespace, gmax)
613
614 call io_close(iunit)
615 pop_sub(pseudopotential_debug)
616 end subroutine pseudopotential_debug
617
618 ! ---------------------------------------------------------
619 subroutine pseudopotential_build(spec, namespace, ispin, dim, print_info)
620 class(pseudopotential_t), intent(inout) :: spec
621 type(namespace_t), intent(in) :: namespace
622 integer, intent(in) :: ispin
623 integer, intent(in) :: dim
624 logical, optional, intent(in) :: print_info
625
626
627 push_sub(pseudopotential_build)
628
629 ! masses are always in amu, so convert them to a.u.
630 call spec%set_mass(units_to_atomic(unit_amu, spec%get_mass()))
631
632 spec%has_density = .false.
633
634 ! allocate structure
635 safe_allocate(spec%ps)
636 if (spec%type == species_pspio) then
637 call ps_pspio_init(spec%ps, namespace, spec%get_label(), spec%get_z(), spec%user_lmax, &
638 ispin, spec%get_filename())
639 else
640 call ps_init(spec%ps, namespace, spec%get_label(), spec%get_z(), spec%user_lmax, &
641 spec%user_llocal, ispin, spec%get_filename())
642 end if
643 call spec%set_zval(spec%ps%z_val)
644 spec%nlcc = spec%ps%nlcc
645 spec%niwfs = ps_bound_niwfs(spec%ps)
646
647 ! invalidate these variables as they should not be used after
648 spec%user_lmax = invalid_l
649 spec%user_llocal = invalid_l
650
651 safe_allocate(spec%iwf_n(1:spec%niwfs, 1:ispin))
652 safe_allocate(spec%iwf_l(1:spec%niwfs, 1:ispin))
653 safe_allocate(spec%iwf_m(1:spec%niwfs, 1:ispin))
654 safe_allocate(spec%iwf_i(1:spec%niwfs, 1:ispin))
655 safe_allocate(spec%iwf_j(1:spec%niwfs))
656
657 call spec%iwf_fix_qn(namespace, ispin, dim)
658
659 pop_sub(pseudopotential_build)
660 end subroutine pseudopotential_build
661
662 ! ---------------------------------------------------------
664 logical pure function pseudopotential_is_ps(this)
665 class(pseudopotential_t), intent(in) :: this
666
668 end function pseudopotential_is_ps
669
670 ! ---------------------------------------------------------
672 logical pure function pseudopotential_is_ps_with_nlcc(this)
673 class(pseudopotential_t), intent(in) :: this
674
675 pseudopotential_is_ps_with_nlcc = this%has_nlcc()
677
678 ! ---------------------------------------------------------
680 logical pure function pseudopotential_represents_real_atom(spec)
681 class(pseudopotential_t), intent(in) :: spec
682
685
686
687
688end module pseudopotential_oct_m
689
690!! Local Variables:
691!! mode: f90
692!! coding: utf-8
693!! End:
Delete the C++ object.
Definition: pseudo_set.F90:133
Nullify the C++ pointer.
Definition: pseudo_set.F90:123
Definition: io.F90:93
This module is intended to contain "only mathematical" functions and procedures.
Definition: math.F90:94
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
Definition: profiling.F90:122
Definition: ps.F90:93
subroutine, public ps_end(ps)
Definition: ps.F90:1095
integer, parameter, public invalid_l
Definition: ps.F90:163
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_is_ultrasoft(spec)
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)
logical pure function pseudopotential_is_paw(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...
logical pure function pseudopotential_requires_generalized_overlap(spec)
integer, parameter, public species_pspio
pseudopotential parsed by pspio library
subroutine, public species_end(species)
Definition: species.F90:480
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:269
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:111
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:124
int true(void)