aiida_raspa.utils package

Submodules

aiida_raspa.utils.base_input_generator module

Basic raspa input generator.

class aiida_raspa.utils.base_input_generator.RaspaInput(params)[source]

Bases: object

Convert input dictionary into input file

__dict__ = mappingproxy({'__module__': 'aiida_raspa.utils.base_input_generator', '__doc__': 'Convert input dictionary into input file', '__init__': <function RaspaInput.__init__>, 'render': <function RaspaInput.render>, '_dict_to_ordered_list': <function RaspaInput._dict_to_ordered_list>, '_render_section': <staticmethod object>, '_render_item': <staticmethod object>, '__dict__': <attribute '__dict__' of 'RaspaInput' objects>, '__weakref__': <attribute '__weakref__' of 'RaspaInput' objects>, '__annotations__': {}})
__init__(params)[source]
__module__ = 'aiida_raspa.utils.base_input_generator'
__weakref__

list of weak references to the object (if defined)

_dict_to_ordered_list(input_dict)[source]

Convert dict to ordered list.

Convert dictionary {“framework_name1”: something1, “framework_name2”: something2} to [something2, something1], where the order is defined by self.system_order list

Parameters

input_dict (dict) – dictionary that looks as folows {“framework_name1”: something1, “framework_name2”: something2}

Returns

a list of items ordered according to the order of frameworks in the input file

Return type

list

static _render_item(output, key, val, indent=0)[source]

It takes one key-value item and adds to the output file

static _render_section(output, params, indent=0)[source]

It takes a dictionary and recurses through.

For key-value pair it checks whether the value is a dictionary and prepends the key with & It passes the valued to the same function, increasing the indentation If the value is a list, I assume that this is something the user wants to store repetitively

render()[source]

Perform conversion

aiida_raspa.utils.base_parser module

Basic raspa output parser.

aiida_raspa.utils.base_parser.float(number)[source]
aiida_raspa.utils.base_parser.parse_base_output(output_abs_path, system_name, ncomponents)[source]

Parse RASPA output file: it is divided in different parts, whose start/end is carefully documented.

aiida_raspa.utils.base_parser.parse_block1(flines, result_dict, prop, value=1, unit=2, dev=4)[source]

Parse block.

Parses blocks that look as follows:

Average Volume:
=================
    Block[ 0]        12025.61229 [A^3]
    Block[ 1]        12025.61229 [A^3]
    Block[ 2]        12025.61229 [A^3]
    Block[ 3]        12025.61229 [A^3]
    Block[ 4]        12025.61229 [A^3]
    ------------------------------------------------------------------------------
    Average          12025.61229 [A^3] +/-            0.00000 [A^3]
aiida_raspa.utils.base_parser.parse_block_energy(flines, res_dict, prop)[source]

Parse energy block.

Parse block that looks as follows:

Average Adsorbate-Adsorbate energy:
===================================
    Block[ 0] -443.23204         Van der Waals: -443.23204         Coulomb: 0.00000            [K]
    Block[ 1] -588.20205         Van der Waals: -588.20205         Coulomb: 0.00000            [K]
    Block[ 2] -538.43355         Van der Waals: -538.43355         Coulomb: 0.00000            [K]
    Block[ 3] -530.00960         Van der Waals: -530.00960         Coulomb: 0.00000            [K]
    Block[ 4] -484.15106         Van der Waals: -484.15106         Coulomb: 0.00000            [K]
    ------------------------------------------------------------------------------
    Average   -516.80566         Van der Waals: -516.805659        Coulomb: 0.00000            [K]
          +/- 98.86943                      +/- 98.869430               +/- 0.00000            [K]
aiida_raspa.utils.base_parser.parse_lines_with_component(res_components, components, line, prop)[source]

Parse lines that contain components

aiida_raspa.utils.inspection_tools module

RASPA inspection tools

aiida_raspa.utils.inspection_tools.add_write_binary_restart(input_dict, write_every)[source]
aiida_raspa.utils.inspection_tools.increase_box_lenght(input_dict, box_name, box_length_current)[source]

Increase the box lenght to improve the convegence.

aiida_raspa.utils.inspection_tools.modify_number_of_cycles(input_dict, additional_init_cycle, additional_prod_cycle)[source]

Modify number of cycles to improve the convergence.

Module contents

Raspa utils.