46 type(ps_fhi_file_t),
allocatable,
private :: fhi_file
47 type(ps_cpi_file_t),
allocatable,
private :: cpi_file
48 type(ps_in_grid_t),
allocatable :: ps_grid
49 type(valconf_t),
allocatable,
private :: conf
56 type(ps_fhi_t),
intent(inout) :: ps_fhi
57 character(len=*),
intent(in) :: filename
58 type(namespace_t),
intent(in) :: namespace
65 safe_allocate(ps_fhi%fhi_file)
66 safe_allocate(ps_fhi%cpi_file)
67 safe_allocate(ps_fhi%ps_grid)
68 safe_allocate(ps_fhi%conf)
70 inquire(file = filename, exist = found)
73 call messages_write(
"Pseudopotential file '" // trim(filename) //
"' not found")
77 iunit =
io_open(filename, action=
'read', form=
'formatted', status=
'old')
90 type(ps_fhi_t),
intent(inout) :: ps_fhi
94 safe_deallocate_a(ps_fhi%fhi_file)
97 safe_deallocate_a(ps_fhi%cpi_file)
98 safe_deallocate_a(ps_fhi%conf)
101 safe_deallocate_a(ps_fhi%ps_grid)
109 type(ps_fhi_t),
intent(inout) :: ps_fhi
110 integer,
intent(in) :: lmax, lloc
111 type(namespace_t),
intent(in) :: namespace
115 if (lmax /= ps_fhi%fhi_file%lmax)
then
116 message(1) =
"Inconsistency in pseudopotential :"
117 write(
message(2),
'(a,i2,a,i2)')
" Input file says lmax = ", lmax, &
118 " but ps file says lmax = ", ps_fhi%fhi_file%lmax
121 if (lloc /= ps_fhi%fhi_file%lloc)
then
122 message(1) =
"Inconsistency in pseudopotential :"
123 write(
message(2),
'(a,i2,a,i2)')
" Input file says lloc = ", lloc, &
124 " but ps file says lloc = ", ps_fhi%fhi_file%lloc
real(real64), parameter, public m_three
subroutine, public io_close(iunit, grp)
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
subroutine, public messages_warning(no_lines, all_nodes, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public ps_cpi_file_read(unit, psf)
subroutine, public ps_cpi_file_end(psf)
subroutine, public ps_cpi_file_to_grid(cpi_file, ps_grid)
subroutine, public ps_fhi_file_read(unit, psf, namespace)
subroutine, public ps_fhi_end(ps_fhi)
subroutine, public ps_fhi_init(ps_fhi, filename, namespace)
subroutine, public ps_fhi_process(ps_fhi, lmax, lloc, namespace)
subroutine, public ps_in_grid_kb_projectors(ps)
KB-projectors kb = (vps - vlocal) |phi> * dknorm.
subroutine, public ps_in_grid_end(ps)
subroutine, public ps_in_grid_cutoff_radii(ps, lloc)
subroutine, public ps_in_grid_kb_cosines(ps, lloc)
KB-cosines and KB-norms: dkbcos stores the KB "cosines:" || (v_l - v_local) phi_l ||^2 / < (v_l - v_l...
subroutine, public ps_in_grid_vlocal(ps, l_loc, rcore, namespace)
subroutine, public ps_in_grid_check_rphi(ps, namespace)
checks normalization of the pseudo wavefunctions
remember that the FHI format is basically the CPI format with a header