29 #include "./base/base_uses.f90"
34 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_read'
51 FUNCTION read_input(input_declaration, file_path, initial_variables, para_env)
RESULT(res)
52 TYPE(section_type),
POINTER :: input_declaration
53 CHARACTER(len=*),
INTENT(in) :: file_path
54 CHARACTER(len=*),
DIMENSION(:, :) :: initial_variables
55 TYPE(mp_para_env_type),
POINTER :: para_env
56 TYPE(section_vals_type),
POINTER :: res
58 CHARACTER(len=*),
PARAMETER :: routinen =
'read_input'
61 TYPE(cp_parser_type) :: cpparser
62 TYPE(cp_unit_set_type) :: default_units
64 CALL timeset(routinen, handle)
67 CALL parser_create(cpparser, initial_variables=initial_variables, file_name=file_path, &
72 default_units=default_units)
Utility routines to read data from files. Kept as close as possible to the old parser because.
character(len=default_path_length), dimension(2, 1:0), public empty_initial_variables
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
subroutine, public cp_unit_set_release(unit_set)
releases the given unit set
subroutine, public cp_unit_set_create(unit_set, name)
initializes the given unit set
Interface to the message passing library MPI.