26 use,
intrinsic :: iso_fortran_env
46 integer,
parameter,
public :: &
47 TD_WANNIER_METHOD_NONE = 0, &
57 integer :: num_bands = 0
58 integer :: num_wann = 0
60 real(real64) :: scdm_mu
61 real(real64) :: scdm_sigma
62 real(real64) :: threshold
63 character(len=80) :: prefix
64 integer :: restart_from
67 logical :: calc_overlaps
68 logical :: dump_inputs
69 logical :: spinors = .false.
70 integer,
allocatable :: spin_proj_component(:)
72 logical,
allocatable :: exclude_list(:)
73 integer,
allocatable :: band_index(:)
77 integer,
dimension(3) :: ws_search_size = [2, 2, 2]
78 real(real64) :: ws_distance_tol = 1e-5 *
p_ang
81 integer :: td_update_interval
83 logical :: td_write_hr
96 class(wannier_opts_t),
intent(inout) :: this
97 type(namespace_t),
intent(in) :: namespace
99 logical :: read_from_td
111 call parse_variable(namespace,
'Wannier90Prefix',
'w90', this%prefix)
125 if (read_from_td)
then
181 call parse_variable(namespace,
'Wannier90UseSCDM', .false., this%use_scdm)
182 if (this%use_scdm)
then
203 call parse_variable(namespace,
'AOThreshold', 0.001_real64, this%threshold)
216 call parse_variable(namespace,
'TDWannierMethod', 0, this%td_method)
226 call parse_variable(namespace,
'TDWannierUpdateInterval', 1, this%td_update_interval)
235 call parse_variable(namespace,
'TDWannierWriteHR', .false., this%td_write_hr)
236 if (this%td_write_hr)
then
237 if (this%td_method == td_wannier_method_none)
then
238 message(1) =
'TDWannierWriteHR is set to yes, but TDWannierMethod is set to None.'
239 message(2) =
'TDWannierWriteHR will be ignored.'
242 message(1) =
'TDWannierWriteHR is set to yes. ' // &
243 'Currently the time-dependent lattice models are gauge-dependent and can not be trusted.'
265 character(len=80) :: filename, line, dummy, dummy1, dummy2
266 integer :: w90_win, io, tmp_int
267 real(real64) :: ws_distance_tol_angstrom
272 filename = trim(adjustl(this%prefix)) //
'.win'
273 inquire(file=filename,exist=exist)
274 if (.not. exist)
then
275 message(1) =
'Cannot find specified Wannier90 win file.'
278 message(1) =
'Reading file '//filename
279 w90_win =
io_open(trim(filename), action=
'read')
281 read(w90_win,
'(A)', iostat=io) line
282 if (is_iostat_end(io))
exit
284 if (index(line,
'=') > 0)
then
285 read(line, *, iostat=io) dummy, dummy2, dummy1
287 read(line, *, iostat=io) dummy, dummy1
289 if (dummy ==
'num_bands')
then
290 read(dummy1, *, iostat=io) tmp_int
291 this%num_bands = tmp_int
292 else if (dummy ==
'num_wann')
then
293 read(dummy1, *, iostat=io) tmp_int
294 this%num_wann = tmp_int
295 else if (dummy ==
'ws_search_size')
then
296 if (index(line,
'=') > 0)
then
297 read(line, *, iostat=io) dummy, dummy2, this%ws_search_size(:)
299 read(line, *, iostat=io) dummy, this%ws_search_size(:)
303 read(dummy1, *, iostat=io) tmp_int
304 this%ws_search_size = tmp_int
306 else if (dummy ==
'ws_distance_tol')
then
307 read(dummy1, *, iostat=io) ws_distance_tol_angstrom
real(real64), parameter, public m_huge
real(real64), parameter, public p_ang
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
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
This module defines the unit system, used for input and output.
type(unit_t), public unit_angstrom
For XYZ files.
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.