rxn.chemutils.rdf.rdf_parser.RdfParser

class rxn.chemutils.rdf.rdf_parser.RdfParser(filename, encoding='latin-1')[source]

Bases: object

Custom parser for RDF files.

Parameters
  • filename (Union[Path, str]) –

  • encoding (str, default: 'latin-1') –

__init__(filename, encoding='latin-1')[source]
Parameters
  • filename (Union[Path, str]) – path to the RDF file to read.

  • encoding (str, default: 'latin-1') – file encoding. Defaults to latin-1 because Thieme has such an encoding for several files.

Methods

__init__(filename[, encoding])

type filename

Union[Path, str]

iter_blocks()

rtype

Iterator[List[str]]

iter_reactions()

rtype

Iterator[RdfReaction]