13 use,
intrinsic :: iso_fortran_env
31 integer,
parameter,
public :: &
32 TD_WANNIER_METHOD_NONE = 0, &
42 integer :: num_bands = 0
43 integer :: num_wann = 0
45 real(real64) :: scdm_mu
46 real(real64) :: scdm_sigma
47 real(real64) :: threshold
48 character(len=80) :: prefix
49 integer :: restart_from
52 logical :: calc_overlaps
53 logical :: dump_inputs
54 logical :: spinors = .false.
55 integer,
allocatable :: spin_proj_component(:)
58 integer :: td_output_interval
70 class(wannier_opts_t),
intent(inout) :: this
71 type(namespace_t),
intent(in) :: namespace
73 logical :: read_from_td
85 call parse_variable(namespace,
'Wannier90Prefix',
'w90', this%prefix)
99 if (read_from_td)
then
155 call parse_variable(namespace,
'Wannier90UseSCDM', .false., this%use_scdm)
156 if (this%use_scdm)
then
177 call parse_variable(namespace,
'AOThreshold', 0.001_real64, this%threshold)
192 call parse_variable(namespace,
'TDWannierMethod', 0, this%td_method)
193 if (this%td_method /= td_wannier_method_none)
then
194 message(1) =
'Time-dependent Wannierization enabled, but not yet implemented.'
206 call parse_variable(namespace,
'TDWannierOutputInterval', 1, this%td_output_interval)
224 character(len=80) :: filename, line, dummy, dummy1, dummy2
225 integer :: w90_win, io, tmp_int
230 filename = trim(adjustl(this%prefix)) //
'.win'
231 inquire(file=filename,exist=exist)
232 if (.not. exist)
then
233 message(1) =
'Cannot find specified Wannier90 win file.'
236 message(1) =
'Reading file '//filename
237 w90_win =
io_open(trim(filename), action=
'read')
239 read(w90_win,
'(A)', iostat=io) line
240 if (is_iostat_end(io))
exit
242 if (index(line,
'=') > 0)
then
243 read(line, *, iostat=io) dummy, dummy2, dummy1
245 read(line, *, iostat=io) dummy, dummy1
247 if (dummy ==
'num_bands')
then
248 read(dummy1, *, iostat=io) tmp_int
249 this%num_bands = tmp_int
250 else if (dummy ==
'num_wann')
then
251 read(dummy1, *, iostat=io) tmp_int
252 this%num_wann = tmp_int
real(real64), parameter, public m_huge
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)
type(namespace_t), public global_namespace
integer, parameter, public restart_gs
integer, parameter, public restart_td
integer, parameter, public td_wannier_method_wannier90
subroutine, public wannier_opts_parse_win(this)
Parse required Wannier90 options from wannier90 .win input file.
subroutine, public wannier_opts_parse_oct(this, namespace)
Parse Wannier90 related options from octopus input file.