w90_readwrite Module

Common read/write routines for data needed by both wannier90.x and postw90.x executables


Uses

  • module~~w90_readwrite~~UsesGraph module~w90_readwrite w90_readwrite module~w90_comms w90_comms module~w90_readwrite->module~w90_comms module~w90_constants w90_constants module~w90_readwrite->module~w90_constants module~w90_types w90_types module~w90_readwrite->module~w90_types module~w90_comms->module~w90_constants module~w90_error_base w90_error_base module~w90_comms->module~w90_error_base module~w90_types->module~w90_constants

Used by

  • module~~w90_readwrite~~UsedByGraph module~w90_readwrite w90_readwrite module~w90_postw90_readwrite w90_postw90_readwrite module~w90_postw90_readwrite->module~w90_readwrite module~w90_wannier90_readwrite w90_wannier90_readwrite module~w90_wannier90_readwrite->module~w90_readwrite proc~calctdfanddos calcTDFandDOS proc~calctdfanddos->module~w90_readwrite proc~input_reader_special input_reader_special proc~input_reader_special->module~w90_readwrite proc~input_reader_special->module~w90_wannier90_readwrite proc~read_chkpt read_chkpt proc~read_chkpt->module~w90_readwrite proc~read_eigvals read_eigvals proc~read_eigvals->module~w90_readwrite proc~w90_input_reader~2 w90_input_reader proc~w90_input_reader~2->module~w90_readwrite proc~w90_input_reader~2->module~w90_wannier90_readwrite proc~w90_input_setopt w90_input_setopt proc~w90_input_setopt->module~w90_readwrite proc~w90_input_setopt->module~w90_wannier90_readwrite proc~w90_print_info~2 w90_print_info proc~w90_print_info~2->module~w90_readwrite proc~w90_print_info~2->module~w90_wannier90_readwrite proc~w90_set_option_c2d w90_set_option_c2d proc~w90_set_option_c2d->module~w90_readwrite proc~w90_set_option_i1d w90_set_option_i1d proc~w90_set_option_i1d->module~w90_readwrite proc~w90_set_option_i2d w90_set_option_i2d proc~w90_set_option_i2d->module~w90_readwrite proc~w90_set_option_int w90_set_option_int proc~w90_set_option_int->module~w90_readwrite proc~w90_set_option_logical w90_set_option_logical proc~w90_set_option_logical->module~w90_readwrite proc~w90_set_option_r1d w90_set_option_r1d proc~w90_set_option_r1d->module~w90_readwrite proc~w90_set_option_r2d w90_set_option_r2d proc~w90_set_option_r2d->module~w90_readwrite proc~w90_set_option_real w90_set_option_real proc~w90_set_option_real->module~w90_readwrite proc~w90_set_option_text w90_set_option_text proc~w90_set_option_text->module~w90_readwrite program~postw90 postw90 program~postw90->module~w90_readwrite program~postw90->module~w90_postw90_readwrite proc~wann_main_gamma wann_main_gamma proc~wann_main_gamma->module~w90_wannier90_readwrite proc~write_chkpt write_chkpt proc~write_chkpt->module~w90_wannier90_readwrite

Functions

public function w90_readwrite_get_smearing_type(smearing_index)

This function returns a string describing the type of smearing associated to a given smr_index integer value.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: smearing_index

The integer index for which we want to get the string

Return Value character(len=80)

public function w90_readwrite_get_convention_type(sc_phase_conv)

This function returns a string describing the convention associated to a sc_phase_conv integer value.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: sc_phase_conv

The integer index for which we want to get the string

Return Value character(len=80)

public function w90_readwrite_get_smearing_index(string, keyword, error, comm)

This function parses a string containing the type of smearing and returns the correct index for the smearing_index variable

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string

The string read from input

character(len=*), intent(in) :: keyword

The keyword that was read (e.g., smr_type), so that we can print a more useful error message

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Return Value integer


Subroutines

public subroutine w90_readwrite_read_verbosity(settings, print_output, svd_omega, error, comm)

read verbosity "iprint" and timing "timing_level" variables if iprint>2 svd_omega printing is enabled printing is supressed on all non-root MPI ranks

Read more…

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(print_output_type), intent(inout) :: print_output
logical, intent(inout) :: svd_omega
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_algorithm_control(settings, optimisation, error, comm)

reads the "optimisation" flag

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout) :: optimisation
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_units(settings, lenconfac, length_unit, energy_unit, bohr, error, comm)

reads the "energy_unit" and "length_unit" (valid: "ang" or "bohr") variables

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(inout) :: lenconfac
character(len=*), intent(inout) :: length_unit
character(len=*), intent(inout) :: energy_unit
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_num_wann(settings, num_wann, error, comm)

reads the number of wannier functions "num_wann" (mandatory input)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_total_bands(settings, total_bands, error, comm)

read the "total_bands" variable this is a convenience for combination with an "exclude_bands" to evaluate num_bands

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout) :: total_bands
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_distk(settings, distk, nkin, stdout, error, comm)

Read MPI distribution of k-points The array to be read must have num_kpt entries, with each entry being the MPI rank to which each k-point is assigned

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout), allocatable :: distk(:)
integer, intent(in) :: nkin
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_exclude_bands(settings, exclude_bands, num_exclude_bands, error, comm)

Read (and allocate) excluded_bands list "exclude_bands"

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout), allocatable :: exclude_bands(:)
integer, intent(out) :: num_exclude_bands
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_num_bands(settings, pw90_effective_model, num_bands, num_wann, error, comm)

Read the number of bands ("num_bands") If not specified (and exclude_bands and total_bands are not both provided), defaults to num_wann

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(in) :: pw90_effective_model
integer, intent(inout) :: num_bands
integer, intent(in) :: num_wann
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_gamma_only(settings, gamma_only, num_kpts, error, comm)

Reads the flag for Gamma-only mode ("gamma_only")

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(inout) :: gamma_only
integer, intent(in) :: num_kpts
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_mp_grid(settings, pw90_effective_model, mp_grid, num_kpts, error, comm)

Read the mandatory k-point mesh input ("mp_grid")

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(in) :: pw90_effective_model
integer, intent(inout) :: mp_grid(3)
integer, intent(inout) :: num_kpts
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_system(settings, w90_system, error, comm)

Read a group of variables defining the system "spinors" -- coupled spins "num_elec_per_state" -- spin degeneracy "num_valence_bands"

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(w90_system_type), intent(inout) :: w90_system
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_kpath(settings, kpoint_path, path_found, bands_plot, error, comm)

Read band plotting path variables: "kpoint_path" and "bands_num_points"

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kpoint_path_type), intent(inout) :: kpoint_path
logical, intent(out) :: path_found
logical, intent(in) :: bands_plot
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_explicit_kpath(settings, kpoint_path, ok, bands_plot, bohr, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kpoint_path_type), intent(inout) :: kpoint_path
logical, intent(out) :: ok
logical, intent(in) :: bands_plot
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_fermi_energy(settings, found_fermi_energy, fermi_energy_list, error, comm)

Read Fermi energy ("fermi_energy") and/or ranges ("fermi_energy_min", "fermi_energy_max" and "fermi_energy_step") used to setup fermi_energy_list tabulation _max and _step are only sought if _min found and are optional

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(out) :: found_fermi_energy
real(kind=dp), intent(out), allocatable :: fermi_energy_list(:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_ws_data(settings, ws_region, error, comm)

Reads "use_ws_distance", "ws_distance_tol", "ws_search_size"

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(ws_region_type), intent(inout) :: ws_region
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_eigvals(eig_found, eigval, num_bands, num_kpts, stdout, seedname, error, comm)

Read the eigenvalues from wannier.eig

Arguments

Type IntentOptional Attributes Name
logical, intent(inout) :: eig_found
real(kind=dp), intent(inout) :: eigval(:,:)
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: stdout
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_dis_manifold(settings, dis_manifold, error, comm)

Reads disentanglement windows "dis_win_min" and "dis_win_max" (both are optional) Reads frozen window "dis_froz_min" and "dis_froz_max" (either neither or both to be supplied)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(dis_manifold_type), intent(inout) :: dis_manifold
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_kmesh_data(settings, kmesh_input, error, comm)

Reads finite-difference input variables: "search_shells" "kmesh_tol" "shell_list" "num_shells" "skip_B1_tests"

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kmesh_input_type), intent(inout) :: kmesh_input
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_kpoints(settings, pw90_effective_model, kpt_latt, num_kpts, mp_grid, bohr, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
logical, intent(in) :: pw90_effective_model
real(kind=dp), intent(out), allocatable :: kpt_latt(:,:)
integer, intent(in) :: num_kpts
integer, intent(in) :: mp_grid(3)
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_readwrite_read_explicit_kpath_points(settings, kpt_latt, bohr, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(out), allocatable :: kpt_latt(:,:)
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_lattice(settings, real_lattice, bohr, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(out) :: real_lattice(3,3)
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_atoms(settings, atom_data, real_lattice, bohr, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(atom_data_type), intent(inout) :: atom_data
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_clear_keywords(settings, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_clean_infile(settings, stdout, seedname, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(in) :: stdout
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_final_alloc(disentanglement, dis_manifold, wannier_data, num_wann, num_bands, num_kpts, error, comm)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: disentanglement
type(dis_manifold_type), intent(inout) :: dis_manifold
type(wannier_data_type), intent(inout) :: wannier_data
integer, intent(in) :: num_wann
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_set_kmesh(spacing, reclat, mesh)

This routines returns the three integers that define the interpolation k-mesh, satisfying the condition that the spacing between two neighboring points along each of the three k_x, k_y and k_z directions is at smaller than a given spacing.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: spacing

Minimum spacing between neighboring points, in angstrom^(-1)

real(kind=dp), intent(in) :: reclat(3,3)

Matrix of the reciprocal lattice vectors in cartesian coordinates, in angstrom^(-1)

integer, intent(out) :: mesh(3)

Will contain the three integers defining the interpolation k-mesh

public subroutine w90_readwrite_write_header(bohr_version_str, constants_version_str1, constants_version_str2, mpi_size, stdout)

Write a suitable header for the calculation - version authors etc

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: bohr_version_str
character(len=*), intent(in) :: constants_version_str1
character(len=*), intent(in) :: constants_version_str2
integer, intent(in) :: mpi_size
integer, intent(in) :: stdout

public subroutine w90_readwrite_dealloc(exclude_bands, wannier_data, input_proj, kmesh_input, kpt_latt, dis_manifold, atom_data, eigval, kpoint_path, error, comm)

release memory from allocated parameters

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), allocatable :: exclude_bands(:)
type(wannier_data_type), intent(inout) :: wannier_data
type(proj_type), intent(inout), allocatable :: input_proj(:)
type(kmesh_input_type), intent(inout) :: kmesh_input
real(kind=dp), intent(inout), allocatable :: kpt_latt(:,:)
type(dis_manifold_type), intent(inout) :: dis_manifold
type(atom_data_type), intent(inout) :: atom_data
real(kind=dp), intent(inout), allocatable :: eigval(:,:)
type(kpoint_path_type), intent(inout) :: kpoint_path
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_chkpt(dis_manifold, exclude_bands, kmesh_info, kpt_latt, wannier_data, m_matrix, u_matrix, u_matrix_opt, real_lattice, omega_invariant, mp_grid, num_bands, num_exclude_bands, num_kpts, num_wann, checkpoint, have_disentangled, ispostw90, seedname, stdout, error, comm)

Read checkpoint file This is used to allocate the matrices.

Read more…

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(inout) :: dis_manifold
integer, intent(inout), allocatable :: exclude_bands(:)
type(kmesh_info_type), intent(in) :: kmesh_info
real(kind=dp), intent(in) :: kpt_latt(:,:)
type(wannier_data_type), intent(inout) :: wannier_data
complex(kind=dp), intent(inout) :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
complex(kind=dp), intent(inout) :: u_matrix_opt(:,:,:)
real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(inout) :: omega_invariant
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_exclude_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
character(len=20), intent(inout) :: checkpoint
logical, intent(out) :: have_disentangled
logical, intent(in) :: ispostw90
character(len=*), intent(in) :: seedname
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_chkpt_header(exclude_bands, kmesh_info, kpt_latt, real_lattice, mp_grid, num_bands, num_exclude_bands, num_kpts, num_wann, checkpoint, have_disentangled, ispostw90, seedname, chk_unit, stdout, error, comm)

Read checkpoint file IMPORTANT! If you change the chkpt format, adapt accordingly also the w90chk2chk.x utility!

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), allocatable :: exclude_bands(:)
type(kmesh_info_type), intent(in) :: kmesh_info
real(kind=dp), intent(in) :: kpt_latt(:,:)
real(kind=dp), intent(in) :: real_lattice(3,3)
integer, intent(in) :: mp_grid(3)
integer, intent(in) :: num_bands
integer, intent(in) :: num_exclude_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
character(len=20), intent(inout) :: checkpoint
logical, intent(out) :: have_disentangled
logical, intent(in) :: ispostw90
character(len=*), intent(in) :: seedname
integer, intent(inout) :: chk_unit
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_read_chkpt_matrices(dis_manifold, kmesh_info, wannier_data, m_matrix, u_matrix, u_matrix_opt, omega_invariant, num_bands, num_kpts, num_wann, have_disentangled, seedname, chk_unit, stdout, error, comm)

Read checkpoint file IMPORTANT! If you change the chkpt format, adapt accordingly also the w90chk2chk.x utility!

Read more…

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(inout) :: dis_manifold
type(kmesh_info_type), intent(in) :: kmesh_info
type(wannier_data_type), intent(inout) :: wannier_data
complex(kind=dp), intent(inout) :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
complex(kind=dp), intent(inout) :: u_matrix_opt(:,:,:)
real(kind=dp), intent(inout) :: omega_invariant
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
logical, intent(in) :: have_disentangled
character(len=*), intent(in) :: seedname
integer, intent(in) :: chk_unit
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_chkpt_dist(dis_manifold, wannier_data, u_matrix, u_matrix_opt, m_matrix, m_matrix_local, omega_invariant, num_bands, num_kpts, num_wann, nntot, checkpoint, have_disentangled, distk, error, comm)

Distribute the chk files

Arguments

Type IntentOptional Attributes Name
type(dis_manifold_type), intent(inout) :: dis_manifold
type(wannier_data_type), intent(inout) :: wannier_data
complex(kind=dp), intent(inout) :: u_matrix(:,:,:)
complex(kind=dp), intent(inout) :: u_matrix_opt(:,:,:)
complex(kind=dp), intent(inout) :: m_matrix(:,:,:,:)
complex(kind=dp), intent(inout) :: m_matrix_local(:,:,:,:)
real(kind=dp), intent(inout) :: omega_invariant
integer, intent(in) :: num_bands
integer, intent(in) :: num_kpts
integer, intent(in) :: num_wann
integer, intent(in) :: nntot
character(len=20), intent(inout) :: checkpoint
logical, intent(inout) :: have_disentangled
integer, intent(in) :: distk(:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_in_file(settings, seedname, error, comm)

Load the *.win file into a character array in_file, ignoring comments and blank lines and converting everything to lowercase characters

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_get_keyword(settings, keyword, found, error, comm, c_value, l_value, i_value, r_value)

Finds the value of the required keyword.

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(out) :: found

Is keyword present

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
character(len=*), intent(inout), optional :: c_value

Keyword value

logical, intent(inout), optional :: l_value

Keyword value

integer, intent(inout), optional :: i_value

Keyword value

real(kind=dp), intent(inout), optional :: r_value

Keyword value

public subroutine w90_readwrite_get_keyword_vector(settings, keyword, found, length, error, comm, c_value, l_value, i_value, r_value, r2_value, c2_value)

Finds the values of the required keyword vector

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(inout) :: found

Is keyword present

integer, intent(in) :: length

Length of vecotr to read

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
character(len=*), intent(inout), optional :: c_value(length)

Keyword data

logical, intent(inout), optional :: l_value(length)

Keyword data

integer, intent(inout), optional :: i_value(length)

Keyword data

real(kind=dp), intent(inout), optional :: r_value(length)

Keyword data

real(kind=dp), intent(inout), optional, allocatable :: r2_value(:,:)

Keyword data

character(len=*), intent(inout), optional, allocatable :: c2_value(:)

Keyword data

public subroutine w90_readwrite_get_vector_length(settings, keyword, found, length, error, comm)

Returns the length of a keyword vector

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(out) :: found

Is keyword present

integer, intent(out) :: length

length of vector

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_get_keyword_block(settings, keyword, found, rows, columns, bohr, error, comm, c_value, l_value, i_value, r_value)

Finds the values of the required data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(out) :: found

Is keyword present

integer, intent(in) :: rows

Number of rows

integer, intent(in) :: columns

Number of columns

real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
character(len=*), intent(inout), optional :: c_value(columns,rows)

keyword block data

logical, intent(inout), optional :: l_value(columns,rows)

keyword block data

integer, intent(inout), optional :: i_value(columns,rows)

keyword block data

real(kind=dp), intent(inout), optional :: r_value(columns,rows)

keyword block data

public subroutine w90_readwrite_get_block_length(settings, keyword, found, rows, error, comm, lunits)

Finds the length of the data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(out) :: found

Is keyword present

integer, intent(out) :: rows

Number of rows

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
logical, intent(out), optional :: lunits

Have we found a unit specification

private subroutine readwrite_get_atoms(settings, atom_data, lunits, real_lattice, bohr, error, comm)

Fills the atom data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(atom_data_type), intent(inout) :: atom_data
logical, intent(in) :: lunits

Do we expect a first line with the units

real(kind=dp), intent(in) :: real_lattice(3,3)
real(kind=dp), intent(in) :: bohr
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_readwrite_set_atoms(atom_data, atoms_label_tmp, atoms_pos_cart_tmp, error, comm)

Fills the atom data block during a library call

Arguments

Type IntentOptional Attributes Name
type(atom_data_type), intent(inout) :: atom_data
character(len=*), intent(in) :: atoms_label_tmp(:)

Atom labels

real(kind=dp), intent(in) :: atoms_pos_cart_tmp(3,atom_data%num_atoms)

Atom positions, Cartesian, Angstrom

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_get_range_vector(settings, keyword, found, length, lcount, error, comm, i_value)

Read a range vector eg. 1,2,3,4-10 or 1 3 400:100 if(lcount) we return the number of states in length

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword

Keyword to examine

logical, intent(out) :: found

Is keyword found

integer, intent(inout) :: length

Number of states

logical, intent(in) :: lcount

If T only count states

type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm
integer, intent(out), optional :: i_value(length)

States specified in range vector

public subroutine w90_readwrite_get_centre_constraints(settings, ccentres_cart, proj_site, num_wann, real_lattice, error, comm)

assigns projection centres as default centre constraints and global Lagrange multiplier as individual Lagrange multipliers then reads the centre_constraints block for individual centre constraint parameters

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
real(kind=dp), intent(inout) :: ccentres_cart(:,:)
real(kind=dp), intent(in) :: proj_site(:,:)
integer, intent(in) :: num_wann
real(kind=dp), intent(in) :: real_lattice(3,3)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine get_centre_constraint_from_column(column, start, finish, wann, dummy, ccentres_frac, error, comm)

assigns value read to constraint parameters based on column

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: column
integer, intent(inout) :: start
integer, intent(inout) :: finish
integer, intent(inout) :: wann
character(len=maxlen), intent(inout) :: dummy
real(kind=dp), intent(inout) :: ccentres_frac(:,:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine w90_readwrite_get_projections(settings, num_proj, atom_data, num_wann, input_proj, inv_lattice, lcount, spinors, bohr, stdout, error, comm)

Fills the projection data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
integer, intent(inout) :: num_proj
type(atom_data_type), intent(in) :: atom_data
integer, intent(in) :: num_wann
type(proj_type), intent(inout), allocatable :: input_proj(:)
real(kind=dp), intent(in) :: inv_lattice(3,3)
logical, intent(in) :: lcount
logical, intent(in) :: spinors
real(kind=dp), intent(in) :: bohr
integer, intent(in) :: stdout
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_readwrite_get_keyword_kpath(settings, kpoint_path, error, comm)

Fills the kpath data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kpoint_path_type), intent(inout) :: kpoint_path
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine w90_readwrite_get_keyword_explicit_kpath(settings, kpoint_path, error, comm)

Fills the explicit_kpath_labels data block

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
type(kpoint_path_type), intent(inout) :: kpoint_path
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

private subroutine clear_block(settings, keyword, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings
character(len=*), intent(in) :: keyword
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

public subroutine init_settings(settings)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings

public subroutine expand_settings(settings)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings

public subroutine w90_readwrite_write_win(settings, seedname, error, comm)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout), target :: settings
character(len=*), intent(in) :: seedname
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm