Reading Chemkin files

Main functions

rmgpy.chemkin.load_chemkin_file()

Load a Chemkin input file located at path on disk to path, returning lists of the species and reactions in the Chemkin file. The ‘thermo_path’ point to a separate thermo file, or, if ‘None’ is specified, the function will look for the thermo database within the chemkin mechanism file. If generate_resonance_structures is True (default if omitted) then resonance isomers for each species are generated. If surface path is specified, the gas and surface species and reactions will be combined

rmgpy.chemkin.load_species_dictionary()

Load an RMG dictionary - containing species identifiers and the associated adjacency lists - from the file located at path on disk. Returns a dict mapping the species identifiers to the loaded species. If generate_resonance_structures is True (default if omitted) then resonance isomers for each species are generated.

rmgpy.chemkin.load_transport_file()

Load a Chemkin transport properties file located at path and store the properties on the species in species_dict. If skip_missing_species=True then species not defined in the species_dict are just skipped over, with a warning.

Helper functions

rmgpy.chemkin.read_kinetics_entry()

Read a kinetics entry for a single reaction as loaded from a Chemkin file. The associated mapping of labels to species species_dict should also be provided. Returns a Reaction object with the reaction and its associated kinetics.

rmgpy.chemkin.read_reaction_comments()

Parse the comments associated with a given reaction. If the comments come from RMG (Py or Java), parse them and extract the useful information. Return the reaction object based on the information parsed from these comments. If read if False, the reaction is returned as an “Unclassified” LibraryReaction.

rmgpy.chemkin.read_reactions_block()

Read a reactions block from a Chemkin file stream.

This function can also read the reactions.txt and pdepreactions.txt files from RMG-Java kinetics libraries, which have a similar syntax.

rmgpy.chemkin.read_thermo_entry()

Read a thermodynamics entry for one species in a Chemkin file. Returns the label of the species and the thermodynamics model as a NASA object.

Format specification at http://www2.galcit.caltech.edu/EDL/public/formats/chemkin.html

rmgpy.chemkin.remove_comment_from_line()

Remove a comment from a line of a Chemkin file or species dictionary file.

Returns the line and the comment. If the comment is encoded with latin-1, it is converted to utf-8.