Documentation for module input_keyword_types

represents keywords in an input

source: input_keyword_types.F
Loading...

public Types:

keyword_type
represent a keyword in the input
keyword_p_type
represent a pointer to a keyword (to make arrays of pointers)

public Subroutines/Functions:

creates a keyword object
writes out a description of the keyword
writes out a description of the keyword
...
releases the given keyword (see doc/ReferenceCounting.html)
SUBROUTINE
keyword_retain (keyword)
retains the given keyword (see doc/ReferenceCounting.html)
...
Prints a description of a keyword in XML format

Parameters:

INTEGER
:: usage_string_length = default_string_length*2

public Types:

TYPE :: keyword_p_type

represent a pointer to a keyword (to make arrays of pointers)


POINTER :: keyword the pointer to the keyword

TYPE :: keyword_type

represent a keyword in the input


INTEGER
:: ref_count ...
INTEGER
:: id_nr ...
DIMENSION(:), POINTER :: names the names of the current keyword (at least one should be present) for example "MAXSCF"
:: usage how to use it "MAXSCF 10"
CHARACTER,
DIMENSION(:), POINTER :: description => NULL() what does it do: "MAXSCF : determines the maximum number of steps in an SCF run"
INTEGER,
POINTER, DIMENSION(:) :: citations references to literature associated with this keyword
INTEGER
:: type_of_var the type of keyword (controls how it is parsed) it can be one of: no_parse_t,logical_t, integer_t, real_t, char_t
INTEGER
:: n_var number of values that should be parsed (-1=unknown)
LOGICAL
:: repeats if the keyword can be present more than once in the section
POINTER :: enum enumeration that defines the mapping between integers and strings
POINTER :: unit the default unit this keyword is read in (to automatically convert to the internal cp2k units during parsing)
TYPE(val_type),
POINTER :: default_value the default value for the keyword
TYPE(val_type),
POINTER :: lone_keyword_value value to be used in presence of the keyword without any parameter

SUBROUTINEkeyword_create(keyword, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations)

creates a keyword object

Arguments:
POINTER
:: keyword the keyword object to be created
CHARACTER(*),
INTENT(in)
:: name the name of the keyword
CHARACTER(*),
INTENT(in)
:: description ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: usage ...
INTEGER,
INTENT(in),
OPTIONAL
:: type_of_var ...
INTEGER,
INTENT(in),
OPTIONAL
:: n_var ...
LOGICAL,
INTENT(in),
OPTIONAL
:: repeats ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: variants(:) ...
TYPE(val_type),
OPTIONAL, POINTER
:: default_val ...
LOGICAL,
INTENT(in),
OPTIONAL
:: default_l_val ...
REAL(dp),
INTENT(in),
OPTIONAL
:: default_r_val ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: default_lc_val ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: default_c_val ...
INTEGER,
INTENT(in),
OPTIONAL
:: default_i_val ...
LOGICAL,
INTENT(in),
OPTIONAL
:: default_l_vals(:) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: default_r_vals(:) ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: default_c_vals(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: default_i_vals(:) ...
TYPE(val_type),
OPTIONAL, POINTER
:: lone_keyword_val ...
LOGICAL,
INTENT(in),
OPTIONAL
:: lone_keyword_l_val ...
REAL(dp),
INTENT(in),
OPTIONAL
:: lone_keyword_r_val ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: lone_keyword_c_val ...
INTEGER,
INTENT(in),
OPTIONAL
:: lone_keyword_i_val ...
LOGICAL,
INTENT(in),
OPTIONAL
:: lone_keyword_l_vals(:) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: lone_keyword_r_vals(:) ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: lone_keyword_c_vals(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: lone_keyword_i_vals(:) ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: enum_c_vals(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: enum_i_vals(:) ...
OPTIONAL, POINTER
:: enum ...
LOGICAL,
INTENT(in),
OPTIONAL
:: enum_strict ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: enum_desc(:) ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: unit_str ...
INTEGER,
INTENT(in),
OPTIONAL
:: citations(:) ...

SUBROUTINEkeyword_describe(keyword, unit_nr, level)

writes out a description of the keyword

Arguments:
POINTER
:: keyword the keyword to describe
INTEGER,
INTENT(in)
:: unit_nr the unit to write to
INTEGER,
INTENT(in)
:: level the description level (0 no description, 1 name 2: +usage, 3: +variants+description+default_value+repeats 4: +type_of_var)

SUBROUTINEkeyword_describe_html(keyword, unit_nr)

writes out a description of the keyword

Arguments:
POINTER
:: keyword the keyword to describe
INTEGER,
INTENT(in)
:: unit_nr the unit to write to

SUBROUTINEkeyword_get(keyword, names, usage, description, type_of_var, n_var, default_value, lone_keyword_value, repeats, enum, citations)

...

Arguments:
POINTER
:: keyword ...
OPTIONAL, POINTER
:: names(:) ...
CHARACTER(*),
INTENT(out),
OPTIONAL
:: usage ...
CHARACTER(*),
INTENT(out),
OPTIONAL
:: description ...
INTEGER,
INTENT(out),
OPTIONAL
:: type_of_var ...
INTEGER,
INTENT(out),
OPTIONAL
:: n_var ...
TYPE(val_type),
OPTIONAL, POINTER
:: default_value ...
TYPE(val_type),
OPTIONAL, POINTER
:: lone_keyword_value ...
LOGICAL,
INTENT(out),
OPTIONAL
:: repeats ...
OPTIONAL, POINTER
:: enum ...
INTEGER,
OPTIONAL, POINTER
:: citations(:) ...

SUBROUTINEkeyword_release(keyword)

releases the given keyword (see doc/ReferenceCounting.html)

Arguments:
POINTER
:: keyword the keyword to release

SUBROUTINEkeyword_retain(keyword)

retains the given keyword (see doc/ReferenceCounting.html)

Arguments:
POINTER
:: keyword the keyword to retain

SUBROUTINEkeyword_typo_match(keyword, unknown_string, location_string, matching_rank, matching_string, bonus)

...

Arguments:
POINTER
:: keyword ...
CHARACTER(*)
:: unknown_string ...
CHARACTER(*)
:: location_string ...
INTEGER,
INTENT(inout)
:: matching_rank(:) ...
CHARACTER(*),
INTENT(inout)
:: matching_string(:) ...
INTEGER,
INTENT(in)
:: bonus ...

SUBROUTINEwrite_keyword_xml(keyword, level, unit_number)

Prints a description of a keyword in XML format

Arguments:
POINTER
:: keyword The keyword to describe
INTEGER,
INTENT(in)
:: level ...
INTEGER,
INTENT(in)
:: unit_number Number of the output unit