aiida_gromacs.parsers package

Submodules

aiida_gromacs.parsers.editconf module

Parsers provided by aiida_gromacs.

This parser adds the ability to parse the outputs of the ‘gmx editconf’ executable.

class aiida_gromacs.parsers.editconf.EditconfParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a EditconfCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.editconf'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

aiida_gromacs.parsers.genericMD module

Parsers provided by aiida_gromacs.

This parser saves outputted files from a generic command.

class aiida_gromacs.parsers.genericMD.GenericParser(node)[source]

Bases: Parser

Parser class for parsing output of genericMD calculation from which the retrieved outputs files from the calcjob and the nodes of finished calculation can be accessed.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a GenericCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.genericMD'
_abc_impl = <_abc._abc_data object>

Modified from: https://github.com/sphuber/aiida-shell/blob/master/src/aiida_shell/parsers/shell.py Format the link label from a given filename with prefix. Valid link labels can only contain alphanumeric characters and underscores, without consecutive underscores. So all characters that are not alphanumeric or an underscore are converted to underscores, where consecutive underscores are merged into one. Additional: Label cannot start with a number or underscore.

Parameters:

filename – The filename.

Returns:

The link label.

parse(**kwargs)[source]

Parse outputs, store results in the AiiDA database.

Returns:

an exit code, if parsing fails or the user defined output files are not returned

aiida_gromacs.parsers.genion module

Parsers provided by aiida_gromacs.

This parser adds the ability to parse the outputs of the ‘gmx genion’ executable.

class aiida_gromacs.parsers.genion.GenionParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a GenionCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.genion'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

aiida_gromacs.parsers.grompp module

Parsers provided by aiida_gromacs.

This parser adds the ability to parse the outputs of the ‘gmx grompp’ executable.

class aiida_gromacs.parsers.grompp.GromppParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a GromppCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.grompp'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

aiida_gromacs.parsers.make_ndx module

Parsers provided by aiida_gromacs.

This calculation configures the ability to use the ‘gmx make_ndx’ executable.

class aiida_gromacs.parsers.make_ndx.Make_ndxParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a Make_ndxCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.make_ndx'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

aiida_gromacs.parsers.mdrun module

Parsers provided by aiida_gromacs.

This calculation configures the ability to use the ‘gmx mdrun’ executable.

class aiida_gromacs.parsers.mdrun.MdrunParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a MdrunCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.mdrun'
_abc_impl = <_abc._abc_data object>
check_trajectory_format(files_expected: list)[source]

In the case where nstxout-compressed = >0, gromacs should produce a xtc file instead of what is requested for -o flag in mdrun. Check if an unexpected xtc file is produced, if so, add this to files_expected, and if a file defined from the -o file is not in the files_retrieved list, then remove it as we have the xtc file instead.

Parameters:
  • files_retrieved – list of file names returned from calc

  • files_expected – list of file names expected to be returned from calc

output_parsed_metadata(output_dir, metadata_dict)[source]

Save a dictionary into a json file if not in testing mode.

Parameters:
  • f – the name of the file node outputted from mdrun

  • output_dir – path to where json file should be saved

  • metadata_dict – the aiida dictionary containing metadata

parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

parse_file_contents(f, output_dir, parser_func, node_name)[source]

Read in the gromacs output file, save into a dictionary node and output dictionary as a json file.

Parameters:
  • f (str) – the name of the file node outputted from mdrun for parsing

  • output_dir – path to where json file should be saved

  • parser_func (class ‘function’) – the function used to parse the file f

  • node_name (str) – the name of the outputted Dict node

aiida_gromacs.parsers.pdb2gmx module

Parsers provided by aiida_gromacs.

This parser adds the ability to parse the outputs of the ‘gmx pdb2gmx’ executable.

class aiida_gromacs.parsers.pdb2gmx.Pdb2gmxParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a Pdb2gmxCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.pdb2gmx'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

aiida_gromacs.parsers.solvate module

Parsers provided by aiida_gromacs.

This parser adds the ability to parse the outputs of the ‘gmx solvate’ executable.

class aiida_gromacs.parsers.solvate.SolvateParser(node)[source]

Bases: Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__annotations__ = {}
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a SolvateCalculation.

Parameters:
__module__ = 'aiida_gromacs.parsers.solvate'
_abc_impl = <_abc._abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns:

an exit code, if parsing fails (or nothing if parsing succeeds)

Module contents

aiida_gromacs

A plugin for using GROMACS with AiiDA for molecular dymanics simulations.