rmgpy.data.kinetics.KineticsDatabase

class rmgpy.data.kinetics.KineticsDatabase

A class for working with the RMG kinetics database.

extractSourceFromComments(reaction)
reaction: A reaction object containing kinetics data and kinetics data comments.
Should be either a PDepReaction, LibraryReaction, or TemplateReaction object as loaded from the rmgpy.chemkin.loadChemkinFile function

Parses the verbose string of comments from the thermo data of the species object, and extracts the thermo sources.

Returns a dictionary with keys of either ‘Rate Rules’, ‘Training’, ‘Library’, or ‘PDep’. A reaction can only be estimated using one of these methods.

source = {‘RateRules’: (Family_Label, OriginalTemplate, RateRules),
‘Library’: String_Name_of_Library_Used, ‘PDep’: Network_Index, ‘Training’: (Family_Label, Training_Reaction_Entry), }
generateReactions(reactants, products=None)

Generate all reactions between the provided list of one or two reactants, which should be Molecule objects. This method searches the depository, libraries, and groups, in that order.

generateReactionsFromFamilies(reactants, products, only_families=None)

Generate all reactions between the provided list of one or two reactants, which should be Molecule objects. This method applies the reaction family. If only_families is a list of strings, only families with those labels are used.

generateReactionsFromLibraries(reactants, products)

Generate all reactions between the provided list of one or two reactants, which should be Molecule objects. This method searches the depository.

generateReactionsFromLibrary(reactants, products, library)

Generate all reactions between the provided list of one or two reactants, which should be Molecule objects. This method searches the depository.

getForwardReactionForFamilyEntry(entry, family, thermoDatabase)

For a given entry for a reaction of the given reaction family (the string label of the family), return the reaction with kinetics and degeneracy for the “forward” direction as defined by the reaction family. For families that are their own reverse, the direction the kinetics is given in will be preserved. If the entry contains functional groups for the reactants, assume that it is given in the forward direction and do nothing. Returns the reaction in the direction consistent with the reaction family template, and the matching template. Note that the returned reaction will have its kinetics and degeneracy set appropriately.

In order to reverse the reactions that are given in the reverse of the direction the family is defined, we need to compute the thermodynamics of the reactants and products. For this reason you must also pass the thermoDatabase to use to generate the thermo data.

load(path, families=None, libraries=None, depositories=None)

Load the kinetics database from the given path on disk, where path points to the top-level folder of the families database.

loadFamilies(path, families=None, depositories=None)

Load the kinetics families from the given path on disk, where path points to the top-level folder of the kinetics families.

loadLibraries(path, libraries=None)

Load the listed kinetics libraries from the given path on disk.

Loads them all if libraries list is not specified or None. The path points to the folder of kinetics libraries in the database, and the libraries should be in files like <path>/<library>.py.

loadOld(path)

Load the old RMG kinetics database from the given path on disk, where path points to the top-level folder of the old RMG database.

loadRecommendedFamiliesList(filepath)

Load the list of recommended families from the given file

The file is usually ‘kinetics/families/recommended.py’. This is stored as a dictionary of True or False values (checked here), and should contain entries for every available family (checked in loadFamilies).

reconstructKineticsFromSource(reaction, source, fixBarrierHeight=False, forcePositiveBarrier=False)

Reaction is the original reaction with original kinetics. Note that for Library and PDep reactions this function does not do anything other than return the original kinetics…

You must enter source data in the appropriate format such as returned from returned from self.extractSourceFromComments, self-constructed. fixBarrierHeight and forcePositiveBarrier will change the kinetics based on the Reaction.fixBarrierHeight function. Return Arrhenius form kinetics if the source is from training reaction or rate rules.

save(path)

Save the kinetics database to the given path on disk, where path points to the top-level folder of the kinetics database.

saveFamilies(path)

Save the kinetics families to the given path on disk, where path points to the top-level folder of the kinetics families.

saveLibraries(path)

Save the kinetics libraries to the given path on disk, where path points to the top-level folder of the kinetics libraries.

saveOld(path)

Save the old RMG kinetics database to the given path on disk, where path points to the top-level folder of the old RMG database.

saveRecommendedFamilies(path)

Save the list of recommended families in a dictionary stored at path/recommended.py