0% found this document useful (0 votes)
18 views325 pages

RMG-Py API Reference

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 325

RMG-Py API Reference

Release 2.4.1

William H. Green, Richard H. West, and the RMG Team

Jul 23, 2019


CONTENTS

1 RMG API Reference 3


1.1 Arkane (arkane) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Chemkin files (rmgpy.chemkin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3 Physical constants (rmgpy.constants) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 Database (rmgpy.data) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.5 Kinetics (rmgpy.kinetics) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.6 Molecular representations (rmgpy.molecule) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
1.7 Pressure dependence (rmgpy.pdep) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
1.8 QMTP (rmgpy.qm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
1.9 Physical quantities (rmgpy.quantity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
1.10 Reactions (rmgpy.reaction) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
1.11 Reaction mechanism generation (rmgpy.rmg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
1.12 Reaction system simulation (rmgpy.solver) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
1.13 Species (rmgpy.species) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
1.14 Statistical mechanics (rmgpy.statmech) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
1.15 Thermodynamics (rmgpy.thermo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
1.16 RMG Exceptions (rmgpy.exceptions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

Bibliography 269

Python Module Index 271

Index 273

i
ii
RMG-Py API Reference, Release 2.4.1

RMG is an automatic chemical reaction mechanism generator that constructs kinetic models composed of elementary
chemical reaction steps using a general understanding of how molecules react.
This is the API Reference guide for RMG. For instructions on how to use RMG, please refer to the User Guide.
For the latest documentation and source code, please visit http://reactionmechanismgenerator.github.io/RMG-Py/

CONTENTS 1
RMG-Py API Reference, Release 2.4.1

2 CONTENTS
CHAPTER

ONE

RMG API REFERENCE

This document provides the complete details of the application programming interface (API) for the Python version
of the Reaction Mechanism Generator. The functionality of RMG-Py is divided into many modules and subpackages.
An overview of these components is given in the table below. Click on the name of a component to learn more and
view its API.

Module Description
arkane Computing chemical properties from quantum chemistry calculations
rmgpy.chemkin Reading and writing models in Chemkin format
rmgpy.constants Physical constants
rmgpy.data Working with the RMG database
rmgpy.kinetics Kinetics models of chemical reaction rates
rmgpy.molecule Molecular representations using chemical graph theory
rmgpy.pdep Pressure-dependent kinetics from master equation models
rmgpy.qm On-the-fly quantum calculations
rmgpy.quantity Physical quantities and unit conversions
rmgpy.reaction Chemical reactions
rmgpy.rmg Automatic reaction mechanism generation
rmgpy.solver Modeling reaction systems
rmgpy.species Chemical species
rmgpy.statmech Statistical mechanics models of molecular degrees of freedom
rmgpy.thermo Thermodynamics models of chemical species
rmgpy.exceptions Custom RMG exception classes

1.1 Arkane (arkane)

The arkane subpackage contains the main functionality for Arkane, a tool for computing thermodynamic and kinetic
properties of chemical species and reactions.

1.1.1 Reading Gaussian log files

Class Description
GaussianLog Extract chemical parameters from Gaussian log files

3
RMG-Py API Reference, Release 2.4.1

1.1.2 Reading Q-Chem log files

Class Description
QchemLog Extract chemical parameters from Q-Chem log files

1.1.3 Reading Molpro log files

Class Description
MolproLog Extract chemical parameters from Molpro log files

1.1.4 Input

Function Description
loadInputFile() Load an Arkane job input file

1.1.5 Job classes

Class Description
Arkane Main class for Arkane jobs
StatMechJob Compute the molecular degrees of freedom for a molecular conformation
ThermoJob Compute the thermodynamic properties of a species
KineticsJob Compute the high pressure-limit rate coefficient for a reaction using transition state theory
Compute the phenomenological pressure-dependent rate coefficients 𝑘(𝑇, 𝑃 ) for a uni-
PressureDependenceJob
molecular reaction network

arkane.gaussian.GaussianLog

class arkane.gaussian.GaussianLog(path)
Represent a log file from Gaussian. The attribute path refers to the location on disk of the Gaussian log file of
interest. Methods are provided to extract a variety of information into Arkane classes and/or NumPy arrays.
getNumberOfAtoms()
Return the number of atoms in the molecular configuration used in the Gaussian log file.
get_optical_isomers_and_symmetry_number()
This method uses the symmetry package from RMG’s QM module and returns a tuple where the first
element is the number of optical isomers and the second element is the symmetry number.
loadConformer(symmetry=None, spinMultiplicity=0, opticalIsomers=None, label=”)
Load the molecular degree of freedom data from a log file created as the result of a Gaussian “Freq”
quantum chemistry calculation. As Gaussian’s guess of the external symmetry number is not always
correct, you can use the symmetry parameter to substitute your own value; if not provided, the value in the
Gaussian log file will be adopted. In a log file with multiple Thermochemistry sections, only the last one
will be kept.
loadEnergy(zpe_scale_factor=1.0)
Load the energy in J/mol from a Gaussian log file. The file is checked for a complete basis set extrapolation;

4 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

if found, that value is returned. Only the last energy in the file is returned. The zero-point energy is not
included in the returned value; it is removed from the CBS-QB3 value.
loadForceConstantMatrix()
Return the force constant matrix from the Gaussian log file. The job that generated the log file must have
the option iop(7/33=1) in order for the proper force constant matrix (in Cartesian coordinates) to be
printed in the log file. If multiple such matrices are identified, only the last is returned. The units of
the returned force constants are J/m^2. If no force constant matrix can be found in the log file, None is
returned.
loadGeometry()
Return the optimum geometry of the molecular configuration from the Gaussian log file. If multiple such
geometries are identified, only the last is returned.
loadNegativeFrequency()
Return the negative frequency from a transition state frequency calculation in cm^-1.
loadScanEnergies()
Extract the optimized energies in J/mol from a log file, e.g. the result of a Gaussian “Scan” quantum
chemistry calculation.
loadZeroPointEnergy()
Load the unscaled zero-point energy in J/mol from a Gaussian log file.

arkane.qchem.QchemLog

class arkane.qchem.QChemLog(path)
Represent an output file from QChem. The attribute path refers to the location on disk of the QChem output file
of interest. Methods are provided to extract a variety of information into Arkane classes and/or NumPy arrays.
getNumberOfAtoms()
Return the number of atoms in the molecular configuration used in the QChem output file.
get_optical_isomers_and_symmetry_number()
This method uses the symmetry package from RMG’s QM module and returns a tuple where the first
element is the number of optical isomers and the second element is the symmetry number.
loadConformer(symmetry=None, spinMultiplicity=0, opticalIsomers=None, label=”)
Load the molecular degree of freedom data from an output file created as the result of a QChem “Freq”
calculation. As QChem’s guess of the external symmetry number is not always correct, you can use the
symmetry parameter to substitute your own value; if not provided, the value in the QChem output file will
be adopted.
loadEnergy(zpe_scale_factor=1.0)
Load the energy in J/mol from a QChem log file. Only the last energy in the file is returned. The zero-point
energy is not included in the returned value.
loadForceConstantMatrix()
Return the force constant matrix (in Cartesian coordinates) from the QChem log file. If multiple such
matrices are identified, only the last is returned. The units of the returned force constants are J/m^2. If no
force constant matrix can be found in the log file, None is returned.
loadGeometry()
Return the optimum geometry of the molecular configuration from the QChem log file. If multiple such
geometries are identified, only the last is returned.
loadNegativeFrequency()
Return the imaginary frequency from a transition state frequency calculation in cm^-1.

1.1. Arkane (arkane) 5


RMG-Py API Reference, Release 2.4.1

loadScanEnergies()
Extract the optimized energies in J/mol from a QChem log file, e.g. the result of a QChem “PES Scan”
quantum chemistry calculation.
loadZeroPointEnergy()
Load the unscaled zero-point energy in J/mol from a QChem output file.

arkane.molpro.MolproLog

class arkane.molpro.MolproLog(path)
Represents a Molpro log file. The attribute path refers to the location on disk of the Molpro log file of interest.
Methods are provided to extract a variety of information into Arkane classes and/or NumPy arrays.
getNumberOfAtoms()
Return the number of atoms in the molecular configuration used in the MolPro log file.
get_optical_isomers_and_symmetry_number()
This method uses the symmetry package from RMG’s QM module and returns a tuple where the first
element is the number of optical isomers and the second element is the symmetry number.
loadConformer(symmetry=None, spinMultiplicity=0, opticalIsomers=None, label=”)
Load the molecular degree of freedom data from a log file created as the result of a MolPro “Freq” quantum
chemistry calculation with the thermo printed.
loadEnergy(zpe_scale_factor=1.0)
Return either the f12 or MRCI energy in J/mol from a Molpro Logfile. If the MRCI job outputted the
MRCI+Davidson energy, the latter is returned. For CCSD(T)-f12, the function determines which energy
(f12a or f12b) to use based on the basis set, which it will parse out of the Molpro file. For the vdz and vtz
basis sets f12a is a better approximation, but for higher basis sets f12b is a better approximation.
loadForceConstantMatrix()
Print the force constant matrix by including the print, hessian command in the input file
loadGeometry()
Return the optimum geometry of the molecular configuration from the Molpro .out file. If multiple such
geometries are identified, only the last is returned.
loadNegativeFrequency()
Return the negative frequency from a transition state frequency calculation in cm^-1.
loadScanEnergies()
Rotor scans are not implemented in Molpro
loadZeroPointEnergy()
Load the unscaled zero-point energy in J/mol from a MolPro log file.

Arkane input files

arkane.input.loadInputFile(path)
Load the Arkane input file located at path on disk, and return a list of the jobs defined in that file.

arkane.KineticsJob

class arkane.KineticsJob(reaction, Tmin=None, Tmax=None, Tlist=None, Tcount=0, sensitiv-


ity_conditions=None)
A representation of an Arkane kinetics job. This job is used to compute and save the high-pressure-limit kinetics
information for a single reaction.

6 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

usedTST - a boolean representing if TST was used to calculate the kinetics if kinetics is already given in
the input, then it is False.
Tlist
The temperatures at which the k(T) values are computed.
Tmax
The maximum temperature at which the computed k(T) values are valid, or None if not defined.
Tmin
The minimum temperature at which the computed k(T) values are valid, or None if not defined.
draw(outputDirectory, format=’pdf’)
Generate a PDF drawing of the reaction. This requires that Cairo and its Python wrapper be available; if
not, the drawing is not generated.
You may also generate different formats of drawings, by changing format to one of the following: pdf, svg,
png.
execute(outputFile=None, plot=True)
Execute the kinetics job, saving the results to the given outputFile on disk.
generateKinetics(Tlist=None)
Generate the kinetics data for the reaction and fit it to a modified Arrhenius model.
plot(outputDirectory)
Plot both the raw kinetics data and the Arrhenius fit versus temperature. The plot is saved to the file
kinetics.pdf in the output directory. The plot is not generated if matplotlib is not installed.
save(outputFile)
Save the results of the kinetics job to the file located at path on disk.

arkane.Arkane

class arkane.Arkane(inputFile=None, outputDirectory=None, verbose=20)


The Arkane class represents an instance of Arkane, a tool for computing properties of chemical species and
reactions. The attributes are:

Attribute Description
jobList A list of the jobs to execute
inputFile The path of the input file defining the jobs to execute
outputDirectory The directory in which to write the output files
verbose The level of detail in the generated logging messages

The output directory defaults to the same directory as the input file if not explicitly specified.
To use this class programmatically, create an instance and set its attributes using either the __init__()
method or by directly accessing the attributes, and then invoke the execute() method. You can also popu-
late the attributes from the command line using the parseCommandLineArguments() method before running
execute().

execute()
Execute, in order, the jobs found in input file specified by the inputFile attribute.
getLibraries()
Get RMG kinetics and thermo libraries

1.1. Arkane (arkane) 7


RMG-Py API Reference, Release 2.4.1

initializeLog(verbose=20, logFile=None)
Set up a logger for Arkane to use to print output to stdout. The verbose parameter is an integer specifying
the amount of log text seen at the console; the levels correspond to those of the logging module.
loadInputFile(inputFile)
Load a set of jobs from the given inputFile on disk. Returns the loaded set of jobs as a list.
logFooter(level=20)
Output a footer to the log.
logHeader(level=20)
Output a header containing identifying information about Arkane to the log.
parseCommandLineArguments()
Parse the command-line arguments being passed to Arkane. This uses the argparse module, which
ensures that the command-line arguments are sensible, parses them, and returns them.

Saving Arkane output

arkane.output.prettify(string, indent=4)
Return a “pretty” version of the given string, representing a snippet of Python code such as a representation of
an object or function. This involves splitting of tuples, lists, and dicts (including parameter lists) onto multiple
lines, indenting as appropriate for readability.
class arkane.output.PrettifyVisitor(level=0, indent=4)
A class for traversing an abstract syntax tree to assemble a prettier version of the code used to create the tree.
Used by the prettify() function.
generic_visit(node)
Called if no explicit visitor function exists for a node.
visit(node)
Visit a node.
visit_Call(node)
Return a pretty representation of the class or function call represented by node.
visit_Dict(node)
Return a pretty representation of the dict represented by node.
visit_List(node)
Return a pretty representation of the list represented by node.
visit_Num(node)
Return a pretty representation of the number represented by node.
visit_Str(node)
Return a pretty representation of the string represented by node.
visit_Tuple(node)
Return a pretty representation of the tuple represented by node.

8 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

arkane.PressureDependenceJob

class arkane.PressureDependenceJob(network, Tmin=None, Tmax=None, Tcount=0, Tlist=None,


Pmin=None, Pmax=None, Pcount=0, Plist=None, maximum-
GrainSize=None, minimumGrainCount=0, method=None,
interpolationModel=None, maximumAtoms=None, activeKRo-
tor=True, activeJRotor=True, rmgmode=False, sensitiv-
ity_conditions=None)
A representation of a pressure dependence job. The attributes are:

Attribute Description
Tmin The minimum temperature at which to compute 𝑘(𝑇, 𝑃 ) values
Tmax The maximum temperature at which to compute 𝑘(𝑇, 𝑃 ) values
Tcount The number of temperatures at which to compute 𝑘(𝑇, 𝑃 ) values
Pmin The minimum pressure at which to compute 𝑘(𝑇, 𝑃 ) values
Pmax The maximum pressure at which to compute 𝑘(𝑇, 𝑃 ) values
Pcount The number of pressures at which to compute 𝑘(𝑇, 𝑃 ) values
Emin The minimum energy to use to compute 𝑘(𝑇, 𝑃 ) values
Emax The maximum energy to use to compute 𝑘(𝑇, 𝑃 ) values
maximumGrainSize The maximum energy grain size to use to compute 𝑘(𝑇, 𝑃 ) values
minimumGrainCount The minimum number of energy grains to use to compute 𝑘(𝑇, 𝑃 ) values
method The method to use to reduce the master equation to 𝑘(𝑇, 𝑃 ) values
interpolationModel The interpolation model to fit to the computed 𝑘(𝑇, 𝑃 ) values
maximumAtoms The maximum number of atoms to apply pressure dependence to (in RMG jobs)
activeKRotor A flag indicating whether to treat the K-rotor as active or adiabatic
activeJRotor A flag indicating whether to treat the J-rotor as active or adiabatic
rmgmode A flag that toggles “RMG mode”, described below
network The unimolecular reaction network
Tlist An array of temperatures at which to compute 𝑘(𝑇, 𝑃 ) values
Plist An array of pressures at which to compute 𝑘(𝑇, 𝑃 ) values
Elist An array of energies to use to compute 𝑘(𝑇, 𝑃 ) values

In RMG mode, several alterations to the k(T,P) algorithm are made both for speed and due to the nature of the
approximations used:
• Densities of states are not computed for product channels
• Arbitrary rigid rotor moments of inertia are included in the active modes; these cancel in the ILT and
equilibrium expressions
• k(E) for each path reaction is computed in the direction A -> products, where A is always an explored
isomer; the high-P kinetics are reversed if necessary for this purpose
• Thermodynamic parameters are always used to compute the reverse k(E) from the forward k(E) for each
path reaction
RMG mode should be turned off by default except in RMG jobs.
Plist
The pressures at which the k(T,P) values are computed.
Pmax
The maximum pressure at which the computed k(T,P) values are valid, or None if not defined.
Pmin
The minimum pressure at which the computed k(T,P) values are valid, or None if not defined.

1.1. Arkane (arkane) 9


RMG-Py API Reference, Release 2.4.1

Tlist
The temperatures at which the k(T,P) values are computed.
Tmax
The maximum temperature at which the computed k(T,P) values are valid, or None if not defined.
Tmin
The minimum temperature at which the computed k(T,P) values are valid, or None if not defined.
copy()
Return a copy of the pressure dependence job.
draw(outputDirectory, format=’pdf’)
Generate a PDF drawing of the pressure-dependent reaction network. This requires that Cairo and its
Python wrapper be available; if not, the drawing is not generated.
You may also generate different formats of drawings, by changing format to one of the following: pdf, svg,
png.
execute(outputFile, plot, format=’pdf’, print_summary=True)
Execute a PressureDependenceJob
fitInterpolationModel(Tdata, Pdata, kdata, kunits)
Fit an interpolation model to a pressure dependent rate
fitInterpolationModels()
Fit all pressure dependent rates with interpolation models
generatePressureList()
Returns an array of pressures based on the interpolation model, minimum and maximum pressures Pmin
and Pmax in Pa, and the number of pressures Pcount. For Chebyshev polynomials a Gauss-Chebyshev
distribution is used; for all others a linear distribution on an logarithmic pressure domain is used. Note
that the Gauss-Chebyshev grid does not place Pmin and Pmax at the endpoints, yet the interpolation is still
valid up to these values.
generateTemperatureList()
Returns an array of temperatures based on the interpolation model, minimum and maximum temperatures
Tmin and Tmax in K, and the number of temperatures Tcount. For Chebyshev polynomials a Gauss-
Chebyshev distribution is used; for all others a linear distribution on an inverse temperature domain is used.
Note that the Gauss-Chebyshev grid does not place Tmin and Tmax at the endpoints, yet the interpolation
is still valid up to these values.
initialize()
Initialize a PressureDependenceJob
maximumGrainSize
The maximum allowed energy grain size, or None if not defined.
plot(outputDirectory)
Plot pressure dependent rates
save(outputFile)
Save the output of a pressure dependent job
saveInputFile(path)
Save an Arkane input file for the pressure dependence job to path on disk.

arkane.StatMechJob

class arkane.StatMechJob(species, path)


A representation of a Arkane statistical mechanics job. This job is used to compute and save the statistical

10 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

mechanics information for a single species or transition state.


execute(outputFile=None, plot=False, pdep=False)
Execute the statistical mechanics job, saving the results to the given outputFile on disk.
load(pdep=False)
Load the statistical mechanics parameters for each conformer from the associated files on disk. Creates
Conformer objects for each conformer and appends them to the list of conformers on the species object.
plotHinderedRotor(angle, v_list, cosineRotor, fourierRotor, rotor, rotorIndex, directory)
Plot the potential for the rotor, along with its cosine and Fourier series potential fits. The plot is saved to a
set of files of the form hindered_rotor_1.pdf.
save(outputFile)
Save the results of the statistical mechanics job to the file located at path on disk.

arkane.ThermoJob

class arkane.ThermoJob(species, thermoClass)


A representation of an Arkane thermodynamics job. This job is used to compute and save the thermodynamics
information for a single species.
element_count_from_conformer()
Get an element count in a dictionary form (e.g., {‘C’: 3, ‘H’: 8}) from the species.conformer attribute.
Returns
Element count, keys are element symbols, values are number of occurrences of the ele-
ment in the molecule.
Return type dict
execute(outputFile=None, plot=False)
Execute the thermodynamics job, saving the results to the given outputFile on disk.
generateThermo()
Generate the thermodynamic data for the species and fit it to the desired heat capacity model (as specified
in the thermoClass attribute).
plot(outputDirectory)
Plot the heat capacity, enthapy, entropy, and Gibbs free energy of the fitted thermodynamics model, along
with the same values from the statistical mechanics model that the thermodynamics model was fitted to.
The plot is saved to the file thermo.pdf in the output directory. The plot is not generated if matplotlib
is not installed.
save(outputFile)
Save the results of the thermodynamics job to the file located at path on disk.

1.2 Chemkin files (rmgpy.chemkin)

The rmgpy.chemkin module contains functions for reading and writing of Chemkin and Chemkin-like files.

1.2. Chemkin files (rmgpy.chemkin) 11


RMG-Py API Reference, Release 2.4.1

1.2.1 Reading Chemkin files

Function Description
loadChemkinFile() Load a reaction mechanism from a Chemkin file
loadSpeciesDictionary() Load a species dictionary from a file
loadTransportFile() Load a Chemkin transport properties file
readKineticsEntry() Read a single reaction entry from a Chemkin file
readReactionComments() Read the comments associated with a reaction entry
readReactionsBlock() Read the reactions block of a Chemkin file
readThermoEntry() Read a single thermodynamics entry from a Chemkin file
removeCommentFromLine() Remove comment text from a line of a Chemkin file or species dictionary

1.2.2 Writing Chemkin files

Function Description
saveChemkinFile() Save a reaction mechanism to a Chemkin file
saveSpeciesDictionary() Save a species dictionary to a file
saveTransportFile() Save a Chemkin transport properties file
saveHTMLFile() Save an HTML file representing a Chemkin mechanism
saveJavaKineticsLibrary() Save a mechanism to a (Chemkin-like) kinetics library for RMG-Java
getSpeciesIdentifier() Return the Chemkin-valid identifier for a given species
markDuplicateReactions() Find and mark all duplicate reactions in a mechanism
writeKineticsEntry() Write a single reaction entry to a Chemkin file
writeThermoEntry() Write a single thermodynamics entry to a Chemkin file

Reading Chemkin files

Main functions

rmgpy.chemkin.loadChemkinFile(path, dictionaryPath=None, transportPath=None, readCom-


ments=True, thermoPath=None, useChemkinNames=False, checkDu-
plicates=True)
Load a Chemkin input file located at path on disk to path, returning lists of the species and reactions in the
Chemkin file. The ‘thermoPath’ point to a separate thermo file, or, if ‘None’ is specified, the function will look
for the thermo database within the chemkin mechanism file
rmgpy.chemkin.loadSpeciesDictionary(path)
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. Resonance isomers for each
species are automatically generated.
rmgpy.chemkin.loadTransportFile(path, speciesDict)
Load a Chemkin transport properties file located at path and store the properties on the species in speciesDict.

Helper functions

rmgpy.chemkin.readKineticsEntry(entry, speciesDict, Aunits, Eunits)


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

12 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.chemkin.readReactionComments(reaction, comments, read=True)


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.readReactionsBlock(f, speciesDict, readComments=True)
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.readThermoEntry(entry, Tmin=0, Tint=0, Tmax=0)
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.removeCommentFromLine(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.

Writing Chemkin files

Main functions

rmgpy.chemkin.saveChemkinFile(path, species, reactions, verbose=True, checkForDuplicates=True)


Save a Chemkin input file to path on disk containing the provided lists of species and reactions. If checkForDu-
plicates is False then we don’t check for unlabeled duplicate reactions, thus saving time (eg. if you are sure
you’ve already labeled them as duplicate).
rmgpy.chemkin.saveSpeciesDictionary(path, species, oldStyle=False)
Save the given list of species as adjacency lists in a text file path on disk.
If oldStyle==True then it saves it in the old RMG-Java syntax.
rmgpy.chemkin.saveTransportFile(path, species)
Save a Chemkin transport properties file to path on disk containing the transport properties of the given list of
species.
The syntax is from the Chemkin TRANSPORT manual. The first 16 columns in each line of the database are
reserved for the species name (Presently CHEMKIN is programmed to allow no more than 16-character names.)
Columns 17 through 80 are free-format, and they contain the molecular parameters for each species. They are,
in order:
1. An index indicating whether the molecule has a monatomic, linear or nonlinear geometrical configuration.
If the index is 0, the molecule is a single atom. If the index is 1 the molecule is linear, and if it is 2, the
molecule is nonlinear.
2. The Lennard-Jones potential well depth 𝜖/𝑘𝐵 in Kelvins.
3. The Lennard-Jones collision diameter 𝜎 in Angstroms.
4. The dipole moment 𝜇 in Debye. Note: a Debye is 10−18 𝑐𝑚3/2 𝑒𝑟𝑔 1/2 .
5. The polarizability 𝛼 in cubic Angstroms.
6. The rotational relaxation collision number 𝑍𝑟 𝑜𝑡 at 298K.
7. After the last number, a comment field can be enclosed in parenthesis.

1.2. Chemkin files (rmgpy.chemkin) 13


RMG-Py API Reference, Release 2.4.1

rmgpy.chemkin.saveHTMLFile(path, readComments=True)
Save an output HTML file from the contents of a RMG-Java output folder
rmgpy.chemkin.saveJavaKineticsLibrary(path, species, reactions)
Save the reaction files for a RMG-Java kinetics library: pdepreactions.txt and reactions.txt given a list of reac-
tions, with species.txt containing the RMG-Java formatted dictionary.

Helper functions

rmgpy.chemkin.getSpeciesIdentifier(species)
Return a string identifier for the provided species that can be used in a Chemkin file. Although the Chemkin
format allows up to 16 characters for a species identifier, this function uses a maximum of 10 to ensure that all
reaction equations fit in the maximum limit of 52 characters.
rmgpy.chemkin.writeKineticsEntry(reaction, speciesList, verbose=True, javaLibrary=False, com-
mented=False)
Return a string representation of the reaction as used in a Chemkin file. Use verbose = True to turn on kinetics
comments. Use commented = True to comment out the entire reaction. Use javaLibrary = True in order to
generate a kinetics entry suitable for an RMG-Java kinetics library.
rmgpy.chemkin.writeThermoEntry(species, elementCounts=None, verbose=True)
Return a string representation of the NASA model readable by Chemkin. To use this method you must have
exactly two NASA polynomials in your model, and you must use the seven-coefficient forms for each.
rmgpy.chemkin.markDuplicateReactions(reactions)
For a given list of reactions, mark all of the duplicate reactions as understood by Chemkin.
This is pretty slow (quadratic in size of reactions list) so only call it if you’re really worried you may have
undetected duplicate reactions.

1.3 Physical constants (rmgpy.constants)

The rmgpy.constants module contains module-level variables defining relevant physical constants relevant in
chemistry applications. The recommended method of importing this module is

import rmgpy.constants as constants

so as to not place the constants in the importing module’s global namespace.


The constants defined in this module are listed in the table below:

14 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Table 1: Physical constants defined in the rmgpy.constants module


Symbol Constant Value Description
𝐸h E_h 4.35974434 × 10−18 J Hartree energy
𝐹 F 96485.3365 C/mol Faraday constant
𝐺 G 6.67384 × 10−11 m3 /kg · s2 Newtonian gravitational constant
𝑁A Na 6.02214179 × 1023 mol−1 Avogadro constant
𝑅 R 8.314472 J/mol · K gas law constant
𝑎0 a0 5.2917721092 × 10−11 m Bohr radius
𝑐 c 299792458 m/s speed of light in a vacuum
𝑒 e 1.602176565 × 10−19 C elementary charge
𝑔 g 9.80665 m/s2 standard acceleration due to gravity
−34
ℎ h 6.62606896 × 10 J·s Planck constant
~ hbar 1.054571726 × 10−34 J · s reduced Planck constant
𝑘B kB 1.3806504 × 10−23 J/K Boltzmann constant
𝑚e m_e 9.10938291 × 10−31 kg electron rest mass
𝑚n m_n 1.674927351 × 10−27 kg neutron rest mass
𝑚p m_p 1.672621777 × 10−27 kg proton rest mass
𝑚u amu 1.660538921 × 10−27 kg atomic mass unit
𝜋 pi 3.14159 . . .

1.4 Database (rmgpy.data)

1.4.1 General classes

Class/Function Description
Entry An entry in a database
Database A database of entries
LogicNode A node in a database that represents a logical collection of entries
LogicAnd A logical collection of entries, where all entries in the collection must match
LogicOr A logical collection of entries, where any entry in the collection can match
makeLogicNode() Create a LogicNode based on a string representation

1.4.2 Thermodynamics database

Class Description
ThermoDepository A depository of all thermodynamics parameters for one or more species
ThermoLibrary A library of curated thermodynamics parameters for one or more species
ThermoGroups A representation of a portion of a database for implementing the Benson group additivity
method
ThermoDatabase An entire thermodynamics database, including depositories, libraries, and groups

1.4. Database (rmgpy.data) 15


RMG-Py API Reference, Release 2.4.1

1.4.3 Kinetics database

Class Description
DepositoryReaction A reaction with kinetics determined from querying a kinetics depository
LibraryReaction A reaction with kinetics determined from querying a kinetics library
TemplateReaction A reaction with kinetics determined from querying a kinetics group additivity or rate rules
method
ReactionRecipe A sequence of actions that represent the process of a chemical reaction
KineticsDepository A depository of all kinetics parameters for one or more reactions
KineticsLibrary A library of curated kinetics parameters for one or more reactions
KineticsGroups A set of group additivity values for a reaction family, organized in a tree
KineticsRules A set of rate rules for a reaction family
KineticsFamily A kinetics database for one reaction family, including depositories, libraries, groups, and
rules
KineticsDatabase A kinetics database for all reaction families, including depositories, libraries, groups, and
rules

1.4.4 Statistical mechanics database

Class Description
GroupFrequencies A set of characteristic frequencies for a group in the frequency database
StatmechDepository A depository of all statistical mechanics parameters for one or more species
StatmechLibrary A library of curated statistical mechanics parameters for one or more species
StatmechGroups A set of characteristic frequencies for various functional groups, organized in a tree
StatmechDatabase An entire statistical mechanics database, including depositories, libraries, and groups

1.4.5 Statistical mechanics fitting

Class/Function Description
DirectFit DQED class for fitting a small number of vibrational frequencies and hindered rotors
PseudoFit DQED class for fitting a large number of vibrational frequencies and hindered rotors by
assuming degeneracies for both
PseudoRotorFit DQED class for fitting a moderate number of vibrational frequencies and hindered rotors
by assuming degeneracies for hindered rotors only
fitStatmechDirect() Directly fit a small number of vibrational frequencies and hindered rotors
fitStatmechPseudo() Fit a large number of vibrational frequencies and hindered rotors by assuming degenera-
cies for both
fitStatmechPseudoRotors()
Fit a moderate number of vibrational frequencies and hindered rotors by assuming de-
generacies for hindered rotors only
fitStatmechToHeatCapacity()
Fit vibrational and torsional degrees of freedom to heat capacity data

rmgpy.data.base.Database

class rmgpy.data.base.Database(entries=None, top=None, label=”, name=”, solvent=None, short-


Desc=”, longDesc=”)
An RMG-style database, consisting of a dictionary of entries (associating items with data), and an optional tree
for assigning a hierarchy to the entries. The use of the tree enables the database to be easily extensible as more
parameters are available.

16 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

In constructing the tree, it is important to develop a hierarchy such that siblings are mutually exclusive, to
ensure that there is a unique path of descent down a tree for each structure. If non-mutually exclusive siblings
are encountered, a warning is raised and the parent of the siblings is returned.
There is no requirement that the children of a node span the range of more specific permutations of the parent.
As the database gets more complex, attempting to maintain complete sets of children for each parent in each
database rapidly becomes untenable, and is against the spirit of extensibility behind the database development.
You must derive from this class and implement the loadEntry(), saveEntry(),
processOldLibraryEntry(), and generateOldLibraryEntry() methods in order to load and
save from the new and old database formats.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.

1.4. Database (rmgpy.data) 17


RMG-Py API Reference, Release 2.4.1

loadOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.

18 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.kinetics.DepositoryReaction

class rmgpy.data.kinetics.DepositoryReaction(index=-1, reactants=None, products=None,


specificCollider=None, kinetics=None, re-
versible=True, transitionState=None, du-
plicate=False, degeneracy=1, pairs=None,
depository=None, family=None, entry=None)
A Reaction object generated from a reaction depository. In addition to the usual attributes, this class includes
depository and entry attributes to store the library and the entry in that depository that it was created from.
allow_max_rate_violation
‘bool’
Type allow_max_rate_violation
allow_pdep_route
‘bool’
Type allow_pdep_route
calculateMicrocanonicalRateCoefficient(self, ndarray Elist, ndarray Jlist, ndarray reac-
DensStates, ndarray prodDensStates=None, double
T=0.0)
Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol.
reacDensStates and prodDensStates are the densities of states of the reactant and product configurations
for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction
is reversible, then both are required. This function will try to use the best method that it can based on the
input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of free-
dom), then RRKM theory will be used.
• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the
inverse Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also
be provided. For isomerization and association reactions prodDensStates is required; for dissociation
reactions it is optional. The temperature is used if provided in the detailed balance expression to determine
the reverse kinetics, and in certain cases in the inverse Laplace transform method.
calculateTSTRateCoefficient(self, double T ) → double
Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature
T in K using (canonical) transition state theory. The TST equation is

𝑄‡ (𝑇 )
(︂ )︂
𝑘B 𝑇 𝐸0
𝑘(𝑇 ) = 𝜅(𝑇 ) exp −
ℎ 𝑄A (𝑇 )𝑄B (𝑇 ) 𝑘B 𝑇

where 𝑄‡ is the partition function of the transition state, 𝑄A and 𝑄B are the partition function of the
reactants, 𝐸0 is the ground-state energy difference from the transition state to the reactants, 𝑇 is the
absolute temperature, 𝑘B is the Boltzmann constant, and ℎ is the Planck constant. 𝜅(𝑇 ) is an optional
tunneling correction.
calculateTSTRateCoefficients(self, ndarray Tlist) → ndarray

1.4. Database (rmgpy.data) 19


RMG-Py API Reference, Release 2.4.1

calculate_coll_limit(self, float temp, bool reverse=False)


Calculate the collision limit rate for the given temperature implemented as recommended in Wang et al.
doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)
canTST(self ) → bool
Return True if the necessary parameters are available for using transition state theory – or the microcanon-
ical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.
check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) → list
Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the
relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the
reaction object and the direction in which the violation was detected.
comment
str
Type comment
copy(self )
Create a deep copy of the current reaction.
degeneracy
The reaction path degeneracy for this reaction.
If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new
degeneracy to the old degeneracy.
draw(self, path)
Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify
the file to save the generated image to; the image type is automatically determined by extension. Valid
extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
duplicate
‘bool’
Type duplicate
elementary_high_p
‘bool’
Type elementary_high_p
ensure_species(self, bool reactant_resonance=False, bool product_resonance=False)
Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found
to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.
Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or
product_resonance, are True. Does not generate resonance for reactants or products that start as Species
objects.
fixBarrierHeight(self, bool forcePositive=False)
Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least
the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi
with an exothermic reaction. If forcePositive is True, then all reactions are forced to have a non-negative
barrier.
fixDiffusionLimitedA(self, T )
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the
specified temperature.

20 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

generate3dTS(self, reactants, products)


Generate the 3D structure of the transition state. Called from model.generateKinetics().
self.reactants is a list of reactants self.products is a list of products
generatePairs(self )
Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact
procedure for doing so depends on the reaction type:

Reaction type Template Resulting pairs


Isomerization A -> C (A,C)
Dissociation A -> C + D (A,C), (A,D)
Association A + B -> C (A,C), (B,C)
Bimolecular A + B -> C + D (A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a
simple similarity analysis by comparing the number of heavy atoms (C/O/N/S at the moment). This should
work most of the time, but a more rigorous algorithm may be needed for some cases.
generateReverseRateCoefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None)
Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the
kinetics attribute is one of several (but not necessarily all) kinetics types.
getEnthalpiesOfReaction(self, ndarray Tlist) → ndarray
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.
getEnthalpyOfReaction(self, double T ) → double
Return the enthalpy of reaction in J/mol evaluated at temperature T in K.
getEntropiesOfReaction(self, ndarray Tlist) → ndarray
Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
getEntropyOfReaction(self, double T ) → double
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
getEquilibriumConstant(self, double T, str type=’Kc’) → double
Return the equilibrium constant for the reaction at the specified temperature T in K. The type parameter
lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getEquilibriumConstants(self, ndarray Tlist, str type=’Kc’) → ndarray
Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parame-
ter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getFreeEnergiesOfReaction(self, ndarray Tlist) → ndarray
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
getFreeEnergyOfReaction(self, double T ) → double
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.
getRateCoefficient(self, double T, double P=0) → double
Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa,
including any reaction path degeneracies.
If diffusionLimiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct
the rate. If not, then use the intrinsic rate coefficient.

1.4. Database (rmgpy.data) 21


RMG-Py API Reference, Release 2.4.1

getSource()
Return the database that was the source of this reaction. For a DepositoryReaction this should be a Kinet-
icsDepository object.
getStoichiometricCoefficient(self, Species spec) → int
Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is
increased by one for each time spec appears as a product and decreased by one for each time spec appears
as a reactant.
getSurfaceRateCoefficient(self, double T, double surfaceSiteDensity) → double
Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site
density surfaceSiteDensity in mol/m2. Value is returned in combination of [m,mol,s]
getURL(self )
Get a URL to search for this reaction in the rmg website.
get_mean_sigma_and_epsilon(self, bool reverse=False)
Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon)
using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the
products
get_reduced_mass(self, bool reverse=False)
Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if
reverse is True
hasTemplate(self, list reactants, list products) → bool
Return True if the reaction matches the template of reactants and products, which are both lists of
Species objects, or False if not.
index
‘int’
Type index
isAssociation(self ) → bool
−−
Return True if the reaction represents an association reaction A + B ↽−⇀
− C or False if not.
isBalanced(self ) → bool
Return True if the reaction has the same number of each atom on each side of the reaction equation, or
False if not.

isDissociation(self ) → bool
−−
Return True if the reaction represents a dissociation reaction A ↽−⇀
− B + C or False if not.
isIsomerization(self ) → bool
Return True if the reaction represents an isomerization reaction A −
↽−
−⇀
− B or False if not.
isIsomorphic(self, Reaction other, bool eitherDirection=True, bool checkIdentical=False, bool
checkOnlyLabel=False, bool checkTemplateRxnProducts=False, bool generateIni-
tialMap=False, bool strict=True) → bool
Return True if this reaction is the same as the other reaction, or False if they are different. The compar-
ison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.
Parameters
• eitherDirection (bool, optional) – if False,then the reaction direction must
match.
• checkIdentical (bool, optional) – if True, check that atom ID’s match (used for
checking degeneracy)
• checkOnlyLabel (bool, optional) – if True, only check the string representation,
ignoring molecular structure comparisons

22 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

• checkTemplateRxnProducts (bool, optional) – if True, only check isomorphism


of reaction products (used when we know the reactants are identical, i.e. in generating
reactions)
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isSurfaceReaction(self ) → bool
Return True if one or more reactants or products are surface species (or surface sites)
isUnimolecular(self ) → bool
−−
Return True if the reaction has a single molecule as either reactant or product (or both) A ↽−⇀
− B + C or
A+B↽ −−
−⇀
− C or A ↽ −−
−⇀− B, or False if not.
is_forward
‘bool’
Type is_forward
k_effective_cache
dict
Type k_effective_cache
kinetics
rmgpy.kinetics.model.KineticsModel
Type kinetics
label
str
Type label
matchesSpecies(self, list reactants, list products=None) → bool
Compares the provided reactants and products against the reactants and products of this reaction. Both
directions are checked.
Parameters
• reactants (list) – Species required on one side of the reaction
• products (list, optional) – Species required on the other side
network_kinetics
rmgpy.kinetics.arrhenius.Arrhenius
Type network_kinetics
pairs
list
Type pairs
products
list
Type products
rank
object
Type rank

1.4. Database (rmgpy.data) 23


RMG-Py API Reference, Release 2.4.1

reactants
list
Type reactants
reverseThisArrheniusRate(self, Arrhenius kForward, str reverseUnits, Tmin=None, Tmax=None)
Reverses the given kForward, which must be an Arrhenius type. You must supply the correct units for the
reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
reversible
‘bool’
Type reversible
specificCollider
rmgpy.species.Species
Type specificCollider
toCantera(self, speciesList=None, useChemkinIdentifier=False)
Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self, speciesList=None, kinetics=True)
Return the chemkin-formatted string for this reaction.
If kinetics is set to True, the chemkin format kinetics will also be returned (requires the speciesList to
figure out third body colliders.) Otherwise, only the reaction string will be returned.
toLabeledStr(self, use_index=False)
the same as __str__ except that the labels are assumed to exist and used for reactant and products rather
than the labels plus the index in parentheses
transitionState
rmgpy.species.TransitionState
Type transitionState

rmgpy.data.base.Entry

class rmgpy.data.base.Entry(index=-1, label=”, item=None, parent=None, children=None,


data=None, reference=None, referenceType=”, shortDesc=”,
longDesc=”, rank=None, nodalDistance=None)
A class for representing individual records in an RMG database. Each entry in the database associates a chemical
item (generally a species, functional group, or reaction) with a piece of data corresponding to that item. A
significant amount of metadata can also be stored with each entry.
The attributes are:

24 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Description
index A unique nonnegative integer index for the entry
label A unique string identifier for the entry (or ‘’ if not used)
item The item that this entry represents
parent The parent of the entry in the hierarchy (or None if not used)
children A list of the children of the entry in the hierarchy (or None if not used)
data The data to associate with the item
reference A Reference object containing bibliographic reference information to the source of the
data
referenceType The way the data was determined: 'theoretical', 'experimental', or 'review'
shortDesc A brief (one-line) description of the data
longDesc A long, verbose description of the data
rank An integer indicating the degree of confidence in the entry data, or None if not used
nodalDis- A float representing the distance of a given entry from it’s parent entry
tance

rmgpy.data.statmech.GroupFrequencies

class rmgpy.data.statmech.GroupFrequencies(frequencies=None, symmetry=1)


Represent a set of characteristic frequencies for a group in the frequency database. These frequencies are stored
in the frequencies attribute, which is a list of tuples, where each tuple defines a lower bound, upper bound,
and degeneracy. Each group also has a symmetry correction.
generateFrequencies(count=1)
Generate a set of frequencies. For each characteristic frequency group, the number of frequencies returned
is degeneracy * count, and these are distributed linearly between the lower and upper bounds.

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 ei-
ther 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, Train-
ing_Reaction_Entry), }
generate_reactions(reactants, products=None, only_families=None, resonance=True)
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.
generate_reactions_from_families(reactants, products=None, only_families=None, reso-
nance=True)
Generate all reactions between the provided list or tuple of one or two reactants, which can be either

1.4. Database (rmgpy.data) 25


RMG-Py API Reference, Release 2.4.1

Molecule objects or Species objects. This method can apply all kinetics families or a selected subset.
Parameters
• reactants – Molecules or Species to react
• products – List of Molecules or Species of desired product structures (optional)
• only_families – List of family labels to generate reactions from (optional) Default is
to generate reactions from all families
• resonance – Flag to generate resonance structures for reactants and products (optional)
Default is True, resonance structures will be generated
Returns List of reactions containing Species objects with the specified reactants and products.
generate_reactions_from_libraries(reactants, products=None)
Find all reactions from all loaded kinetics library involving the provided reactants, which can be either
Molecule objects or Species objects.
generate_reactions_from_library(library, reactants, products=None)
Find all reactions from the specified kinetics library involving the provided reactants, which can be either
Molecule objects or Species objects.
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 noth-
ing. 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.
The families argument accepts a single item or list of the following:
• Specific kinetics family labels
• Names of family sets defined in recommended.py
• ‘all’
• ‘none’
If all items begin with a ! (e.g. [‘!H_Abstraction’]), then the selection will be inverted to families NOT in
the list.
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.

26 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

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 recommended families from the given file. The file is usually stored at ‘kinet-
ics/families/recommended.py’.
The old style was as a dictionary named recommendedFamilies containing all family names as keys with
True/False values.
The new style is as multiple sets with unique names which can be used individually or in combination.
Both styles can be loaded by this method.
react_molecules(molecules, products=None, only_families=None, prod_resonance=True)
Generate reactions from all families for the input molecules.
reconstructKineticsFromSource(reaction, source, fixBarrierHeight=False, forcePositiveBar-
rier=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 recommended families to [path]/recommended.py. The old style was as a dictionary named
recommendedFamilies. The new style is as multiple sets with different labels.

rmgpy.data.kinetics.KineticsDepository

class rmgpy.data.kinetics.KineticsDepository(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with an RMG kinetics depository. Each depository corresponds to a reaction family (a
KineticsFamily object). Each entry in a kinetics depository involves a reaction defined either by a real
reactant and product species (as in a kinetics library).
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.

1.4. Database (rmgpy.data) 27


RMG-Py API Reference, Release 2.4.1

areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms

28 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the kinetics database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.kinetics.KineticsFamily

class rmgpy.data.kinetics.KineticsFamily(entries=None, top=None, label=”, name=”, re-


verse=”, reversible=True, shortDesc=”, longDesc=”,
forwardTemplate=None, forwardRecipe=None, re-
verseTemplate=None, reverseRecipe=None, for-
bidden=None, boundaryAtoms=None, treeDis-
tances=None)
A class for working with an RMG kinetics family: a set of reactions with similar chemistry, and therefore similar
reaction rates. The attributes are:

1.4. Database (rmgpy.data) 29


RMG-Py API Reference, Release 2.4.1

Attribute Type Description


reverse string The name of the reverse reaction family
reversible Boolean Is family reversible? (True by default)
forwardTem- Reaction The forward reaction template
plate
for- ReactionRecipe The steps to take when applying the forward reaction to a set of
wardRecipe reactants
reverseTem- Reaction The reverse reaction template
plate
reverseRecipe ReactionRecipe The steps to take when applying the reverse reaction to a set of
reactants
forbidden ForbiddenStructures
(Optional) Forbidden product structures in either direction
ownReverse Boolean It’s its own reverse?
‘boundary- list Labels which define the boundaries of end groups in backbone/end
Atoms’ families
treeDistances dict The default distance from parent along each tree, if not set default
is 1 for every tree
groups KineticsGroups The set of kinetics group additivity values
rules KineticsRules The set of kinetics rate rules from RMG-Java
depositories list A set of additional depositories used to store kinetics data from var-
ious sources

There are a few reaction families that are their own reverse (hydrogen abstraction and intramolecular hydrogen
migration); for these reverseTemplate and reverseRecipe will both be None.
addAtomLabelsForReaction(reaction, output_with_resonance=True)
Apply atom labels on a reaction using the appropriate atom labels from this reaction family.
The reaction is modified in place containing species objects with the atoms labeled. If out-
put_with_resonance is True, all resonance structures are generated with labels. If false, only the first
resonance structure sucessfully able to map to the reaction is used. None is returned.
addEntry(parent, grp, name)
Adds a group entry with parent parent group structure grp and group name name
addKineticsRulesFromTrainingSet(thermoDatabase=None, trainIndices=None)
For each reaction involving real reactants and products in the training set, add a rate rule for that reaction.
addReverseAttribute(rxn, react_non_reactive=True)
For rxn (with species’ objects) from families with ownReverse, this method adds a reverse attribute that
contains the reverse reaction information (like degeneracy)
Returns True if successful and False if the reverse reaction is forbidden. Will raise a KineticsError if
unsuccessful for other reasons.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
applyRecipe(reactantStructures, forward=True, unique=True)
Apply the recipe for this reaction family to the list of Molecule objects reactantStructures. The atoms
of the reactant structures must already be tagged with the appropriate labels. Returns a list of structures
corresponding to the products after checking that the correct number of products was produced.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.

30 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

calculateDegeneracy(reaction)
For a reaction with Molecule or Species objects given in the direction in which the kinetics are defined,
compute the reaction-path degeneracy.
This method by default adjusts for double counting of identical reactants. This should only be adjusted
once per reaction. To not adjust for identical reactants (since you will be reducing them later in the
algorithm), add ignoreSameReactants= True to this method.
cleanTreeGroups(thermoDatabase=None)
clears groups and rules in the tree, generates an appropriate root group to start from and then reads training
reactions Note this only works if a single top node (not a logic node) can be generated
crossValidate(folds=5, templateRxnMap=None, T=1000.0, iters=0, random_state=1)
Perform K-fold cross validation on an automatically generated tree at temperature T after finding an ap-
propriate node for kinetics estimation it will move up the tree iters times. Returns a dictionary mapping
{rxn:Ln(k_Est/k_Train)}
crossValidateOld(folds=5, T=1000.0, random_state=1, estimator=’rate rules’, thermo-
Database=None)
Perform K-fold cross validation on an automatically generated tree at temperature T Returns a dictionary
mapping {rxn:Ln(k_Est/k_Train)}
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
distributeTreeDistances()
fills in nodalDistance (the distance between an entry and its parent) if not already entered with the value
from treeDistances associated with the tree the entry comes from
estimateKineticsUsingGroupAdditivity(template, degeneracy=1)
Determine the appropriate kinetics for a reaction with the given template using group additivity.
Returns just the kinetics, or None.
estimateKineticsUsingRateRules(template, degeneracy=1)
Determine the appropriate kinetics for a reaction with the given template using rate rules.
Returns a tuple (kinetics, entry) where entry is the database entry used to determine the kinetics only if it
is an exact match, and is None if some averaging or use of a parent node took place.
evalExt(parent, ext, extname, templateRxnMap, obj=None, T=1000.0)
evaluates the objective function obj for the extension ext with name extname to the parent entry parent
extendNode(parent, templateRxnMap, thermoDatabase=None, obj=None, T=1000.0)
Constructs an extension to the group parent based on evaluation of the objective function obj
extractSourceFromComments(reaction)
Returns the rate rule associated with the kinetics of a reaction by parsing the comments.
Will return the template associated with the matched rate rule. Returns a tuple containing
(Boolean_Is_Kinetics_From_Training_reaction, Source_Data)

1.4. Database (rmgpy.data) 31


RMG-Py API Reference, Release 2.4.1

For a training reaction, the Source_Data returns:

[Family_Label, Training_Reaction_Entry, Kinetics_In_Reverse?]

For a reaction from rate rules, the Source_Data is a tuple containing:

[Family_Label, {'template': originalTemplate,


'degeneracy': degeneracy,
'exact': boolean_exact?,
'rules': a list of (original rate rule entry, weight in average)
'training': a list of (original rate rule entry associated with
˓→training entry, original training entry, weight in average)}]

where Exact is a boolean of whether the rate is an exact match, Template is the reaction template used,
RateRules is a list of the rate rule entries containing the kinetics used, and TrainingReactions are ones that
have created rules used in the estimate.
fillKineticsRulesByAveragingUp(verbose=False)
Fill in gaps in the kinetics rate rules by averaging child nodes recursively starting from the top level root
template.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
generateProductTemplate(reactants0)
Generate the product structures by applying the reaction template to the top-level nodes. For reactants
defined by multiple structures, only the first is used here; it is assumed to be the most generic.
generateReactions(reactants, products=None, prod_resonance=True)
Generate all reactions between the provided list of one, two, or three reactants, which should be either
single Molecule objects or lists of same. Does not estimate the kinetics of these reactions at this time.
Returns a list of TemplateReaction objects using Molecule objects for both reactants and products
The reactions are constructed such that the forward direction is consistent with the template of this reaction
family.
Parameters
• reactants (list) – List of Molecules to react.
• products (list, optional) – List of Molecules or Species of desired product struc-
tures.
• prod_resonance (bool, optional) – Flag to generate resonance structures for prod-
uct checking. Defaults to True, resonance structures are compared.
Returns List of all reactions containing Molecule objects with the specified reactants and prod-
ucts within this family. Degenerate reactions are returned as separate reactions.
generateTree(obj=None, thermoDatabase=None, T=1000.0)
Generate a tree by greedy optimization based on the objective function obj the optimization is done by
iterating through every group and if the group has more than one training reaction associated with it a set
of potential more specific extensions are generated and the extension that optimizing the objective function
combination is chosen and the iteration starts over at the beginning
additionally the tree structure is simplified on the fly by removing groups that have no kinetics data associ-
ated if their parent has no kinetics data associated and they either have only one child or have two children
one of which has no kinetics data and no children (its parent becomes the parent of its only relevant child
node)
getBackboneRoots()
Returns: the top level backbone node in a unimolecular family.

32 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getEndRoots()
Returns: A list of top level end nodes in a unimolecular family
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getExtensionEdge(parent, templateRxnMap, obj, T )
finds the set of all extension groups to parent such that 1) the extension group divides the set of reactions
under parent 2) No generalization of the extension group divides the set of reactions under parent
We find this by generating all possible extensions of the initial group. Extensions that split reactions are
added to the list. All extensions that do not split reactions and do not create bonds are ignored (although
those that match every reaction are labeled so we don’t search them twice). Those that match all reactions
and involve bond creation undergo this process again.
Principle: Say you have two elementary changes to a group ext1 and ext2 if applying ext1 and ext2 results
in a split at least one of ext1 and ext2 must result in a split
Speed of this algorithm relies heavily on searching non bond creation dimensions once.
getKinetics(reaction, templateLabels, degeneracy=1, estimator=”, returnAllKinetics=True)
Return the kinetics for the given reaction by searching the various depositories as well as generating a
result using the user-specified estimator of either ‘group additivity’ or ‘rate rules’. Unlike the regular
getKinetics() method, this returns a list of results, with each result comprising of

1. the kinetics
2. the source - this will be None if from a template estimate
3. the entry - this will be None if from a template estimate
4. is_forward a boolean denoting whether the matched entry is in the same direction as the inputted
reaction. This will always be True if using rates rules or group additivity. This can be True or False if
using a depository
If returnAllKinetics==False, only the first (best?) matching kinetics is returned.
getKineticsForTemplate(template, degeneracy=1, method=’rate rules’)
Return an estimate of the kinetics for a reaction with the given template and reaction-path degeneracy.
There are two possible methods to use: ‘group additivity’ (new possible RMG-Py behavior) and ‘rate
rules’ (old RMG-Java behavior, and default RMG-Py behavior).
Returns a tuple (kinetics, entry): If it’s estimated via ‘rate rules’ and an exact match is found in the tree,
then the entry is returned as the second element of the tuple. But if an average is used, or the ‘group
additivity’ method, then the tuple returned is (kinetics, None).
getKineticsFromDepository(depository, reaction, template, degeneracy)
Search the given depository in this kinetics family for kinetics for the given reaction. Returns a list of all
of the matching kinetics, the corresponding entries, and True if the kinetics match the forward direction
or False if they match the reverse direction.
getLabeledReactantsAndProducts(reactants, products)
Given reactants, a list of Molecule objects, and products, a list of Molecule objects, return two new
lists of Molecule objects with atoms labeled: one for reactants, one for products. Returned molecules
are totally new entities in memory so input molecules reactants and products won’t be affected. If RMG
cannot find appropriate labels, (None, None) will be returned.
getRateRule(template)
Return the rate rule with the given template. Raises a ValueError if no corresponding entry exists.

1.4. Database (rmgpy.data) 33


RMG-Py API Reference, Release 2.4.1

getReactionMatches(rxns=None, thermoDatabase=None, removeDegeneracy=False, estimateTh-


ermo=True, fixLabels=False, exactMatchesOnly=False, getReverse=False)
returns a dictionary mapping for each entry in the tree: (entry.label,entry.item) : list of all training reactions
(or the list given) that match that entry
getReactionPairs(reaction)
For a given reaction with properly-labeled Molecule objects as the reactants, return the reactant-product
pairs to use when performing flux analysis.
getReactionTemplate(reaction)
For a given reaction with properly-labeled Molecule objects as the reactants, determine the most specific
nodes in the tree that describe the reaction.
getReactionTemplateLabels(reaction)
Retrieve the template for the reaction and return the corresponding labels for each of the groups in the
template.
getRootTemplate()
Return the root template for the reaction family. Most of the time this is the top-level nodes of the tree (as
stored in the KineticsGroups object), but there are a few exceptions (e.g. R_Recombination).
getSourcesForTemplate(template)
Returns the set of rate rules and training reactions used to average this template. Note that the tree must be
averaged with verbose=True for this to work.
Returns a tuple of rules, training
where rules are a list of tuples containing the [(original_entry, weight_used_in_average), . . . ]
and training is a list of tuples containing the [(rate_rule_entry, training_reaction_entry,
weight_used_in_average),. . . ]
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
getTopLevelGroups(root)
Returns a list of group nodes that are the highest in the tree starting at node “root”. If “root” is a group
node, then it will return a single-element list with “root”. Otherwise, for every child of root, we descend
until we find no nodes with logic nodes. We then return a list of all group nodes found along the way.
getTrainingDepository()
Returns the training depository from self.depositories
getTrainingSet(thermoDatabase=None, removeDegeneracy=False, estimateThermo=True, fixLa-
bels=False, getReverse=False)
retrieves all reactions in the training set, assigns thermo to the species objects reverses reactions as nec-
essary so that all reactions are in the forward direction and returns the resulting list of reactions in the
forward direction with thermo assigned
getw0(rxn)
calculates the w0 for Blower Masel kinetics by calculating wf (total bond energy of bonds formed) and wb
(total bond energy of bonds broken) with w0 = (wf+wb)/2
hasRateRule(template)
Return True if a rate rule with the given template currently exists, or False otherwise.
isEntryMatch(mol, entry)
determines if the labeled molecule object of reactants matches the entry entry
isMoleculeForbidden(molecule)
Return True if the molecule is forbidden in this family, or False otherwise.

34 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

load(path, local_context=None, global_context=None, depositoryLabels=None)


Load a kinetics database from a file located at path on disk.
If depositoryLabels is a list, eg. [‘training’,’PrIMe’], then only those depositories are loaded, and they are
searched in that order when generating kinetics.
If depositoryLabels is None then load ‘training’ first then everything else. If depositoryLabels is not None
then load in the order specified in depositoryLabels.
loadForbidden(label, group, shortDesc=”, longDesc=”)
Load information about a forbidden structure.
loadOld(path)
Load an old-style RMG kinetics group additivity database from the location path.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTemplate(path)
Load an old-style RMG reaction family template from the location path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
loadRecipe(actions)
Load information about the reaction recipe.
loadTemplate(reactants, products, ownReverse=False)
Load information about the reaction template.
makeTree(obj=None, regularization=<function simpleRegularization>, thermoDatabase=None,
T=1000.0)
generates tree structure and then generates rules for the tree
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

1.4. Database (rmgpy.data) 35


RMG-Py API Reference, Release 2.4.1

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
regularize(regularization=<function simpleRegularization>, keepRoot=True)
Regularizes the tree according to the regularization function regularization
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
retrieveOriginalEntry(templateLabel)
Retrieves the original entry, be it a rule or training reaction, given the template label in the form
‘group1;group2’ or ‘group1;group2;group3’
Returns tuple in the form (RateRuleEntry, TrainingReactionEntry)
Where the TrainingReactionEntry is only present if it comes from a training reaction
retrieveTemplate(templateLabels)
Reconstruct the groups associated with the labels of the reaction template and return a list.
save(path)
Save the current database to the file at location path on disk.
saveDepository(depository, path)
Save the given kinetics family depository to the location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveGeneratedTree(path=None)
clears the rules and saves the family to its current location in database
saveGroups(path)
Save the current database to the file at location path on disk.
saveOld(path)
Save the old RMG kinetics groups to the given path on disk.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.

36 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

saveOldTemplate(path)
Save an old-style RMG reaction family template from the location path.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.
saveTrainingReactions(reactions, reference=None, referenceType=”, shortDesc=”, longDesc=”,
rank=3)
This function takes a list of reactions appends it to the training reactions file. It ignores the existence of
duplicate reactions.
The rank for each new reaction’s kinetics is set to a default value of 3 unless the user specifies differently
for those reactions.
For each entry, the long description is imported from the kinetics comment.
simpleRegularization(node)
Simplest regularization algorithm All nodes are made as specific as their descendant reactions Training
reactions are assumed to not generalize For example if an particular atom at a node is Oxygen for all of its
descendent reactions a reaction where it is Sulfur will never hit that node unless it is the top node even if
the tree did not split on the identity of that atom
splitReactions(rxns, newgrp)
divides the reactions in rxns between the new group structure newgrp and the old structure with label
oldlabel returns a list of reactions associated with the new group the list of reactions associated with the
old group and a list of the indices of all of the reactions associated with the new group

rmgpy.data.kinetics.KineticsGroups

class rmgpy.data.kinetics.KineticsGroups(entries=None, top=None, label=”, name=”, short-


Desc=”, longDesc=”, forwardTemplate=None,
forwardRecipe=None, reverseTemplate=None, re-
verseRecipe=None, forbidden=None)
A class for working with an RMG kinetics family group additivity values.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
estimateKineticsUsingGroupAdditivity(template, referenceKinetics, degeneracy=1)
Determine the appropriate kinetics for a reaction with the given template using group additivity.
Returns just the kinetics.

1.4. Database (rmgpy.data) 37


RMG-Py API Reference, Release 2.4.1

generateGroupAdditivityValues(trainingSet, kunits, method=’Arrhenius’)


Generate the group additivity values using the given trainingSet, a list of 2-tuples of the form (template,
kinetics). You must also specify the kunits for the family and the method to use when generating the
group values. Returns True if the group values have changed significantly since the last time they were
fitted, or False otherwise.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getReactionTemplate(reaction)
For a given reaction with properly-labeled Molecule objects as the reactants, determine the most specific
nodes in the tree that describe the reaction.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadEntry(index, label, group, kinetics, reference=None, referenceType=”, shortDesc=”, longDesc=”,
nodalDistance=None)
nodalDistance is the distance between a given entry and its parent specified by a float
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.

38 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.kinetics.KineticsLibrary

class rmgpy.data.kinetics.KineticsLibrary(label=”, name=”, solvent=None, shortDesc=”,


longDesc=”, autoGenerated=False)
A class for working with an RMG kinetics library.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.

1.4. Database (rmgpy.data) 39


RMG-Py API Reference, Release 2.4.1

checkForDuplicates(markDuplicates=False)
Check that all duplicate reactions in the kinetics library are properly marked (i.e. with their duplicate
attribute set to True). If markDuplicates is set to True, then ignore and mark all duplicate reactions as
duplicate.
convertDuplicatesToMulti()
Merge all marked duplicate reactions in the kinetics library into single reactions with multiple kinetics.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getLibraryReactions()
makes library and template reactions as appropriate from the library comments and returns at list of all of
these LibraryReaction and TemplateReaction objects
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
loadOld(path)
Load an old-style RMG kinetics library from the location path.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
markValidDuplicates(reactions1, reactions2)
Check for reactions that appear in both lists, and mark them as (valid) duplicates.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.

40 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the kinetics library to the file object f.
saveOld(path)
Save an old-style reaction library to path. This creates files named species.txt, reactions.txt,
and pdepreactions.txt in the given directory; these contain the species dictionary, high-pressure limit
reactions and kinetics, and pressure-dependent reactions and kinetics, respectively.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

1.4. Database (rmgpy.data) 41


RMG-Py API Reference, Release 2.4.1

rmgpy.data.kinetics.KineticsRules

class rmgpy.data.kinetics.KineticsRules(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with a set of “rate rules” for a RMG kinetics family.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
estimateKinetics(template, degeneracy=1)
Determine the appropriate kinetics for a reaction with the given template using rate rules.
Returns a tuple (kinetics, entry) where entry is the database entry used to determine the kinetics only if it
is an exact match, and is None if some averaging or use of a parent node took place.
fillRulesByAveragingUp(rootTemplate, alreadyDone, verbose=False)
Fill in gaps in the kinetics rate rules by averaging child nodes. If verbose is set to True, then exact sources
of kinetics are saved in the kinetics comments (warning: this uses up a lot of memory due to the extensively
long comments)
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getAllRules(template)
Return all of the exact rate rules with the given template. Raises a ValueError if no corresponding entry
exists.
getEntries()
Return a list of all of the entries in the rate rules database, sorted by index.
getEntriesToSave()
Return a sorted list of all of the entries in the rate rules database to save.
getRule(template)
Return the exact rate rule with the given template, or None if no corresponding entry exists.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
hasRule(template)
Return True if a rate rule with the given template currently exists, or False otherwise.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding

42 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(path, groups, numLabels)
Load a set of old rate rules for kinetics groups into this depository.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
processOldLibraryEntry(data)
Process a list of parameters data as read from an old-style RMG thermo database, returning the corre-
sponding kinetics object.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also

1.4. Database (rmgpy.data) 43


RMG-Py API Reference, Release 2.4.1

update the parent/child relationships


Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(path, groups)
Save a set of old rate rules for kinetics groups from this depository.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.kinetics.LibraryReaction

class rmgpy.data.kinetics.LibraryReaction(index=-1, reactants=None, products=None,


specificCollider=None, kinetics=None, net-
work_kinetics=None, reversible=True, tran-
sitionState=None, duplicate=False, degen-
eracy=1, pairs=None, library=None, al-
low_pdep_route=False, elementary_high_p=False,
allow_max_rate_violation=False, entry=None)
A Reaction object generated from a reaction library. In addition to the usual attributes, this class includes library
and entry attributes to store the library and the entry in that library that it was created from.
allow_max_rate_violation
‘bool’
Type allow_max_rate_violation
allow_pdep_route
‘bool’
Type allow_pdep_route
calculateMicrocanonicalRateCoefficient(self, ndarray Elist, ndarray Jlist, ndarray reac-
DensStates, ndarray prodDensStates=None, double
T=0.0)
Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol.
reacDensStates and prodDensStates are the densities of states of the reactant and product configurations
for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction
is reversible, then both are required. This function will try to use the best method that it can based on the
input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of free-
dom), then RRKM theory will be used.

44 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the
inverse Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also
be provided. For isomerization and association reactions prodDensStates is required; for dissociation
reactions it is optional. The temperature is used if provided in the detailed balance expression to determine
the reverse kinetics, and in certain cases in the inverse Laplace transform method.
calculateTSTRateCoefficient(self, double T ) → double
Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature
T in K using (canonical) transition state theory. The TST equation is

𝑄‡ (𝑇 )
(︂ )︂
𝑘B 𝑇 𝐸0
𝑘(𝑇 ) = 𝜅(𝑇 ) exp −
ℎ 𝑄A (𝑇 )𝑄B (𝑇 ) 𝑘B 𝑇

where 𝑄‡ is the partition function of the transition state, 𝑄A and 𝑄B are the partition function of the
reactants, 𝐸0 is the ground-state energy difference from the transition state to the reactants, 𝑇 is the
absolute temperature, 𝑘B is the Boltzmann constant, and ℎ is the Planck constant. 𝜅(𝑇 ) is an optional
tunneling correction.
calculateTSTRateCoefficients(self, ndarray Tlist) → ndarray

calculate_coll_limit(self, float temp, bool reverse=False)


Calculate the collision limit rate for the given temperature implemented as recommended in Wang et al.
doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)
canTST(self ) → bool
Return True if the necessary parameters are available for using transition state theory – or the microcanon-
ical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.
check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) → list
Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the
relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the
reaction object and the direction in which the violation was detected.
comment
str
Type comment
copy(self )
Create a deep copy of the current reaction.
degeneracy
The reaction path degeneracy for this reaction.
If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new
degeneracy to the old degeneracy.
draw(self, path)
Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify
the file to save the generated image to; the image type is automatically determined by extension. Valid
extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
duplicate
‘bool’
Type duplicate
elementary_high_p
‘bool’

1.4. Database (rmgpy.data) 45


RMG-Py API Reference, Release 2.4.1

Type elementary_high_p
ensure_species(self, bool reactant_resonance=False, bool product_resonance=False)
Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found
to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.
Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or
product_resonance, are True. Does not generate resonance for reactants or products that start as Species
objects.
fixBarrierHeight(self, bool forcePositive=False)
Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least
the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi
with an exothermic reaction. If forcePositive is True, then all reactions are forced to have a non-negative
barrier.
fixDiffusionLimitedA(self, T )
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the
specified temperature.
generate3dTS(self, reactants, products)
Generate the 3D structure of the transition state. Called from model.generateKinetics().
self.reactants is a list of reactants self.products is a list of products
generatePairs(self )
Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact
procedure for doing so depends on the reaction type:

Reaction type Template Resulting pairs


Isomerization A -> C (A,C)
Dissociation A -> C + D (A,C), (A,D)
Association A + B -> C (A,C), (B,C)
Bimolecular A + B -> C + D (A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a
simple similarity analysis by comparing the number of heavy atoms (C/O/N/S at the moment). This should
work most of the time, but a more rigorous algorithm may be needed for some cases.
generateReverseRateCoefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None)
Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the
kinetics attribute is one of several (but not necessarily all) kinetics types.
generate_high_p_limit_kinetics()
If the LibraryReactions represented by self has pressure dependent kinetics, try extracting the high pres-
sure limit rate from it. Used for incorporating library reactions with pressure-dependent kinetics in PDep
networks. Only reactions flagged as elementary_high_p=True should be processed here. If the kinet-
ics is a :class:Lindemann or a :class:Troe, simply get the high pressure limit rate. If the kinetics is a
:class:PDepArrhenius or a :class:Chebyshev, generate a :class:Arrhenius kinetics entry that represents the
high pressure limit if Pmax >= 90 bar . This high pressure limit Arrhenius kinetics is assigned to the
reaction network_kinetics attribute. If this method successfully generated the high pressure limit kinetics,
return True, otherwise False.
getEnthalpiesOfReaction(self, ndarray Tlist) → ndarray
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.
getEnthalpyOfReaction(self, double T ) → double
Return the enthalpy of reaction in J/mol evaluated at temperature T in K.

46 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getEntropiesOfReaction(self, ndarray Tlist) → ndarray


Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
getEntropyOfReaction(self, double T ) → double
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
getEquilibriumConstant(self, double T, str type=’Kc’) → double
Return the equilibrium constant for the reaction at the specified temperature T in K. The type parameter
lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getEquilibriumConstants(self, ndarray Tlist, str type=’Kc’) → ndarray
Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parame-
ter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getFreeEnergiesOfReaction(self, ndarray Tlist) → ndarray
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
getFreeEnergyOfReaction(self, double T ) → double
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.
getRateCoefficient(self, double T, double P=0) → double
Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa,
including any reaction path degeneracies.
If diffusionLimiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct
the rate. If not, then use the intrinsic rate coefficient.
getSource()
Return the database that was the source of this reaction. For a LibraryReaction this should be a Kinetic-
sLibrary object.
getStoichiometricCoefficient(self, Species spec) → int
Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is
increased by one for each time spec appears as a product and decreased by one for each time spec appears
as a reactant.
getSurfaceRateCoefficient(self, double T, double surfaceSiteDensity) → double
Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site
density surfaceSiteDensity in mol/m2. Value is returned in combination of [m,mol,s]
getURL(self )
Get a URL to search for this reaction in the rmg website.
get_mean_sigma_and_epsilon(self, bool reverse=False)
Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon)
using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the
products
get_reduced_mass(self, bool reverse=False)
Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if
reverse is True
hasTemplate(self, list reactants, list products) → bool
Return True if the reaction matches the template of reactants and products, which are both lists of
Species objects, or False if not.

index
‘int’
Type index

1.4. Database (rmgpy.data) 47


RMG-Py API Reference, Release 2.4.1

isAssociation(self ) → bool
−−
Return True if the reaction represents an association reaction A + B ↽−⇀
− C or False if not.
isBalanced(self ) → bool
Return True if the reaction has the same number of each atom on each side of the reaction equation, or
False if not.

isDissociation(self ) → bool
−−
Return True if the reaction represents a dissociation reaction A ↽−⇀
− B + C or False if not.
isIsomerization(self ) → bool
Return True if the reaction represents an isomerization reaction A −
↽−
−⇀
− B or False if not.
isIsomorphic(self, Reaction other, bool eitherDirection=True, bool checkIdentical=False, bool
checkOnlyLabel=False, bool checkTemplateRxnProducts=False, bool generateIni-
tialMap=False, bool strict=True) → bool
Return True if this reaction is the same as the other reaction, or False if they are different. The compar-
ison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.
Parameters
• eitherDirection (bool, optional) – if False,then the reaction direction must
match.
• checkIdentical (bool, optional) – if True, check that atom ID’s match (used for
checking degeneracy)
• checkOnlyLabel (bool, optional) – if True, only check the string representation,
ignoring molecular structure comparisons
• checkTemplateRxnProducts (bool, optional) – if True, only check isomorphism
of reaction products (used when we know the reactants are identical, i.e. in generating
reactions)
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isSurfaceReaction(self ) → bool
Return True if one or more reactants or products are surface species (or surface sites)
isUnimolecular(self ) → bool
Return True if the reaction has a single molecule as either reactant or product (or both) A −
↽−
−⇀
− B + C or
−−⇀ −−⇀
A + B ↽−− C or A ↽−− B, or False if not.
is_forward
‘bool’
Type is_forward
k_effective_cache
dict
Type k_effective_cache
kinetics
rmgpy.kinetics.model.KineticsModel
Type kinetics
label
str
Type label

48 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

matchesSpecies(self, list reactants, list products=None) → bool


Compares the provided reactants and products against the reactants and products of this reaction. Both
directions are checked.
Parameters
• reactants (list) – Species required on one side of the reaction
• products (list, optional) – Species required on the other side
network_kinetics
rmgpy.kinetics.arrhenius.Arrhenius
Type network_kinetics
pairs
list
Type pairs
products
list
Type products
rank
object
Type rank
reactants
list
Type reactants
reverseThisArrheniusRate(self, Arrhenius kForward, str reverseUnits, Tmin=None, Tmax=None)
Reverses the given kForward, which must be an Arrhenius type. You must supply the correct units for the
reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
reversible
‘bool’
Type reversible
specificCollider
rmgpy.species.Species
Type specificCollider
toCantera(self, speciesList=None, useChemkinIdentifier=False)
Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self, speciesList=None, kinetics=True)
Return the chemkin-formatted string for this reaction.
If kinetics is set to True, the chemkin format kinetics will also be returned (requires the speciesList to
figure out third body colliders.) Otherwise, only the reaction string will be returned.
toLabeledStr(self, use_index=False)
the same as __str__ except that the labels are assumed to exist and used for reactant and products rather
than the labels plus the index in parentheses

1.4. Database (rmgpy.data) 49


RMG-Py API Reference, Release 2.4.1

transitionState
rmgpy.species.TransitionState
Type transitionState

rmgpy.data.base.LogicNode

class rmgpy.data.base.LogicNode(items, invert)


A base class for AND and OR logic nodes.
class rmgpy.data.base.LogicAnd(items, invert)
A logical AND node. Structure must match all components.
matchToStructure(database, structure, atoms, strict=False)
Does this node in the given database match the given structure with the labeled atoms?
Setting strict to True makes enforces matching of atomLabels in the structure to every atomLabel in the
node.
class rmgpy.data.base.LogicOr(items, invert)
A logical OR node. Structure can match any component.
Initialize with a list of component items and a boolean instruction to invert the answer.
getPossibleStructures(entries)
Return a list of the possible structures below this node.
matchLogicOr(other)
Is other the same LogicOr group as self?
matchToStructure(database, structure, atoms, strict=False)
Does this node in the given database match the given structure with the labeled atoms?
Setting strict to True makes enforces matching of atomLabels in the structure to every atomLabel in the
node.
rmgpy.data.base.makeLogicNode(string)
Creates and returns a node in the tree which is a logic node.
String should be of the form:
• OR{}
• AND{}
• NOT OR{}
• NOT AND{}
And the returned object will be of class LogicOr or LogicAnd

rmgpy.data.kinetics.ReactionRecipe

class rmgpy.data.kinetics.ReactionRecipe(actions=None)
Represent a list of actions that, when executed, result in the conversion of a set of reactants to a set of products.
There are currently five such actions:

50 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Action Arguments Description


Name
CHANGE_BONDcenter1, order, change the bond order of the bond between center1 and center2 by order;
center2 do not break or form bonds
FORM_BOND center1, order, form a new bond between center1 and center2 of type order
center2
BREAK_BONDcenter1, order, break the bond between center1 and center2, which should be of type
center2 order
GAIN_RADICAL
center, radical increase the number of free electrons on center by radical
LOSE_RADICAL
center, radical decrease the number of free electrons on center by radical
GAIN_PAIR center, pair increase the number of lone electron pairs on center by pair
LOSE_PAIR center, pair decrease the number of lone electron pairs on center by pair

The actions are stored as a list in the actions attribute. Each action is a list of items; the first is the action name,
while the rest are the action parameters as indicated above.
addAction(action)
Add an action to the reaction recipe, where action is a list containing the action name and the required
parameters, as indicated in the table above.
applyForward(struct, unique=True)
Apply the forward reaction recipe to molecule, a single Molecule object.
applyReverse(struct, unique=True)
Apply the reverse reaction recipe to molecule, a single Molecule object.
getReverse()
Generate a reaction recipe that, when applied, does the opposite of what the current recipe does, i.e., it is
the recipe for the reverse of the reaction that this is the recipe for.

rmgpy.data.statmech.StatmechDatabase

class rmgpy.data.statmech.StatmechDatabase
A class for working with the RMG statistical mechanics (frequencies) database.
getStatmechData(molecule, thermoModel=None)
Return the thermodynamic parameters for a given Molecule object molecule. This function first searches
the loaded libraries in order, returning the first match found, before falling back to estimation via group
additivity.
getStatmechDataFromDepository(molecule)
Return statmech data for the given Molecule object molecule by searching the entries in the depository.
Returns a list of tuples (statmechData, depository, entry).
getStatmechDataFromGroups(molecule, thermoModel)
Return statmech data for the given Molecule object molecule by estimating using characteristic group
frequencies and fitting the remaining internal modes to heat capacity data from the given thermo model
thermoModel. This always returns valid degrees of freedom data.
getStatmechDataFromLibrary(molecule, library)
Return statmech data for the given Molecule object molecule by searching the entries in the specified
StatmechLibrary object library. Returns None if no data was found.
load(path, libraries=None, depository=True)
Load the statmech database from the given path on disk, where path points to the top-level folder of the
thermo database.

1.4. Database (rmgpy.data) 51


RMG-Py API Reference, Release 2.4.1

loadDepository(path)
Load the statmech database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadGroups(path)
Load the statmech database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadLibraries(path, libraries=None)
Load the statmech database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadOld(path)
Load the old RMG thermo database from the given path on disk, where path points to the top-level folder
of the old RMG database.
save(path)
Save the statmech database to the given path on disk, where path points to the top-level folder of the
statmech database.
saveDepository(path)
Save the statmech depository to the given path on disk, where path points to the top-level folder of the
statmech depository.
saveGroups(path)
Save the statmech groups to the given path on disk, where path points to the top-level folder of the statmech
groups.
saveLibraries(path)
Save the statmech libraries to the given path on disk, where path points to the top-level folder of the
statmech libraries.
saveOld(path)
Save the old RMG thermo database to the given path on disk, where path points to the top-level folder of
the old RMG database.

rmgpy.data.statmech.StatmechDepository

class rmgpy.data.statmech.StatmechDepository(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with the RMG statistical mechanics (frequencies) depository.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.

52 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

1.4. Database (rmgpy.data) 53


RMG-Py API Reference, Release 2.4.1

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.statmechfit

Fitting functions

rmgpy.data.statmechfit.fitStatmechToHeatCapacity(Tlist, Cvlist, Nvib, Nrot, molecule=None)


For a given set of dimensionless heat capacity data Cvlist corresponding to temperature list Tlist in K, fit Nvib
harmonic oscillator and Nrot hindered internal rotor modes. External and other previously-known modes should
have already been removed from Cvlist prior to calling this function. You must provide at least 7 values for
Cvlist.
This function returns a list containing the fitted vibrational frequencies in a HarmonicOscillator object and
the fitted 1D hindered rotors in HinderedRotor objects.

54 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.data.statmechfit.fitStatmechDirect(Tlist, Cvlist, Nvib, Nrot, molecule=None)


Fit Nvib harmonic oscillator and Nrot hindered internal rotor modes to the provided dimensionless heat capaci-
ties Cvlist at temperatures Tlist in K. This method assumes that there are enough heat capacity points provided
that the vibrational frequencies and hindered rotation frequency- barrier pairs can be fit directly.
rmgpy.data.statmechfit.fitStatmechPseudoRotors(Tlist, Cvlist, Nvib, Nrot, molecule=None)
Fit Nvib harmonic oscillator and Nrot hindered internal rotor modes to the provided dimensionless heat capac-
ities Cvlist at temperatures Tlist in K. This method assumes that there are enough heat capacity points pro-
vided that the vibrational frequencies can be fit directly, but the hindered rotors must be combined into a single
“pseudo-rotor”.
rmgpy.data.statmechfit.fitStatmechPseudo(Tlist, Cvlist, Nvib, Nrot, molecule=None)
Fit Nvib harmonic oscillator and Nrot hindered internal rotor modes to the provided dimensionless heat capac-
ities Cvlist at temperatures Tlist in K. This method assumes that there are relatively few heat capacity points
provided, so the vibrations must be combined into one real vibration and two “pseudo-vibrations” and the hin-
dered rotors must be combined into a single “pseudo-rotor”.

Helper functions

rmgpy.data.statmechfit.harmonicOscillator_heatCapacity(T, freq)
Return the heat capacity in J/mol*K at the given set of temperatures Tlist in K for the harmonic oscillator with
a frequency freq in cm^-1.
rmgpy.data.statmechfit.harmonicOscillator_d_heatCapacity_d_freq(T, freq)
Return the first derivative of the heat capacity with respect to the harmonic oscillator frequency in J/mol*K/cm^-
1 at the given set of temperatures Tlist in K, evaluated at the frequency freq in cm^-1.
rmgpy.data.statmechfit.hinderedRotor_heatCapacity(T, freq, barr)
Return the heat capacity in J/mol*K at the given set of temperatures Tlist in K for the 1D hindered rotor with a
frequency freq in cm^-1 and a barrier height barr in cm^-1.
rmgpy.data.statmechfit.hinderedRotor_d_heatCapacity_d_freq(T, freq, barr)
Return the first derivative of the heat capacity with respect to the hindered rotor frequency in J/mol*K/cm^-1 at
the given set of temperatures Tlist in K, evaluated at the frequency freq in cm^-1 and a barrier height barr in
cm^-1.
rmgpy.data.statmechfit.hinderedRotor_d_heatCapacity_d_barr(T, freq, barr)
Return the first derivative of the heat capacity with respect to the hindered rotor frequency in J/mol*K/cm^-1 at
the given set of temperatures Tlist in K, evaluated at the frequency freq in cm^-1 and a barrier height barr in
cm^-1.

Helper classes

class rmgpy.data.statmechfit.DirectFit(Tdata, Cvdata, Nvib, Nrot)


Class for fitting vibrational frequencies and hindered rotor frequency-barrier pairs for the case when there are
few enough oscillators and rotors that their values can be fit directly.
evaluate(x)
Evaluate the nonlinear equations and constraints for this system, and the corresponding Jacobian matrices,
at the given value of the solution vector x. Return a tuple containing three items:
• A vector of the current values of the system of equations f (x).
𝜕𝑓𝑖
• A matrix of the current values of the Jacobian of the system of equations: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

′ 𝜕𝑔𝑖
• A matrix of the current values of the Jacobian of the (linear) constrains: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

1.4. Database (rmgpy.data) 55


RMG-Py API Reference, Release 2.4.1

initialize()
Initialize the DQED solver. The required parameters are:
• Neq - The number of algebraic equations.
• Nvars - The number of unknown variables.
• Ncons - The number of constraint equations.
The optional parameters are:
• bounds - A list of 2-tuples giving the lower and upper bound for each unknown variable. Use None
if there is no bound in one or either direction. If provided, you must give bounds for every unknown
variable.
• tolf - The tolerance used for stopping when the norm of the residual has absolute length less than tolf,
i.e. ‖𝑓⃗‖ ≤ 𝜖𝑓 .
• told - The tolerance used for stopping when changes to the unknown variables has absolute length less
than told, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑑 .
• tolx - The tolerance used for stopping when changes to the unknown variables has relative length less
than tolx, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑥 · ‖⃗𝑥‖.
• maxIter - The maximum number of iterations to use
• verbose - True to have DQED print extra information about the solve, False to only see printed
output when the solver has an error.
solve()
Using the initial guess x0, return the least-squares solution to the set of nonlinear algebraic equations
defined by the evaluate() method of the derived class. This is the method that actually conducts the
call to DQED. Returns the solution vector and a flag indicating the status of the solve. The possible output
values of the flag are:

Value Meaning
2 The norm of the residual is zero; the solution vector is a root of the system
3 The bounds on the trust region are being encountered on each step; the solution vector may or
may not be a local minimum
4 The solution vector is a local minimum
5 A significant amount of noise or uncertainty has been observed in the residual; the solution may
or may not be a local minimum
6 The solution vector is only changing by small absolute amounts; the solution may or may not
be a local minimum
7 The solution vector is only changing by small relative amounts; the solution may or may not be
a local minimum
8 The maximum number of iterations has been reached; the solution is the best found, but may or
may not be a local minimum
9-18 An error occurred during the solve operation; the solution is not a local minimum

class rmgpy.data.statmechfit.PseudoRotorFit(Tdata, Cvdata, Nvib, Nrot)


Class for fitting vibrational frequencies and hindered rotor frequency-barrier pairs for the case when there are
too many oscillators and rotors for their values can be fit directly, and where collapsing the rotors into a single
pseudo-rotor allows for fitting the vibrational frequencies directly.
evaluate(x)
Evaluate the nonlinear equations and constraints for this system, and the corresponding Jacobian matrices,
at the given value of the solution vector x. Return a tuple containing three items:
• A vector of the current values of the system of equations f (x).

56 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

𝜕𝑓𝑖
• A matrix of the current values of the Jacobian of the system of equations: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

′ 𝜕𝑔𝑖
• A matrix of the current values of the Jacobian of the (linear) constrains: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

initialize()
Initialize the DQED solver. The required parameters are:
• Neq - The number of algebraic equations.
• Nvars - The number of unknown variables.
• Ncons - The number of constraint equations.
The optional parameters are:
• bounds - A list of 2-tuples giving the lower and upper bound for each unknown variable. Use None
if there is no bound in one or either direction. If provided, you must give bounds for every unknown
variable.
• tolf - The tolerance used for stopping when the norm of the residual has absolute length less than tolf,
i.e. ‖𝑓⃗‖ ≤ 𝜖𝑓 .
• told - The tolerance used for stopping when changes to the unknown variables has absolute length less
than told, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑑 .
• tolx - The tolerance used for stopping when changes to the unknown variables has relative length less
than tolx, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑥 · ‖⃗𝑥‖.
• maxIter - The maximum number of iterations to use
• verbose - True to have DQED print extra information about the solve, False to only see printed
output when the solver has an error.
solve()
Using the initial guess x0, return the least-squares solution to the set of nonlinear algebraic equations
defined by the evaluate() method of the derived class. This is the method that actually conducts the
call to DQED. Returns the solution vector and a flag indicating the status of the solve. The possible output
values of the flag are:

Value Meaning
2 The norm of the residual is zero; the solution vector is a root of the system
3 The bounds on the trust region are being encountered on each step; the solution vector may or
may not be a local minimum
4 The solution vector is a local minimum
5 A significant amount of noise or uncertainty has been observed in the residual; the solution may
or may not be a local minimum
6 The solution vector is only changing by small absolute amounts; the solution may or may not
be a local minimum
7 The solution vector is only changing by small relative amounts; the solution may or may not be
a local minimum
8 The maximum number of iterations has been reached; the solution is the best found, but may or
may not be a local minimum
9-18 An error occurred during the solve operation; the solution is not a local minimum

class rmgpy.data.statmechfit.PseudoFit(Tdata, Cvdata, Nvib, Nrot)


Class for fitting vibrational frequencies and hindered rotor frequency-barrier pairs for the case when there are
too many oscillators and rotors for their values can be fit directly, and where we must collapse both the vibrations
and hindered rotations into “pseudo-oscillators” and “pseudo-rotors”.

1.4. Database (rmgpy.data) 57


RMG-Py API Reference, Release 2.4.1

evaluate(x)
Evaluate the nonlinear equations and constraints for this system, and the corresponding Jacobian matrices,
at the given value of the solution vector x. Return a tuple containing three items:
• A vector of the current values of the system of equations f (x).
𝜕𝑓𝑖
• A matrix of the current values of the Jacobian of the system of equations: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

′ 𝜕𝑔𝑖
• A matrix of the current values of the Jacobian of the (linear) constrains: 𝐽𝑖𝑗 = 𝜕𝑥𝑗 .

initialize()
Initialize the DQED solver. The required parameters are:
• Neq - The number of algebraic equations.
• Nvars - The number of unknown variables.
• Ncons - The number of constraint equations.
The optional parameters are:
• bounds - A list of 2-tuples giving the lower and upper bound for each unknown variable. Use None
if there is no bound in one or either direction. If provided, you must give bounds for every unknown
variable.
• tolf - The tolerance used for stopping when the norm of the residual has absolute length less than tolf,
i.e. ‖𝑓⃗‖ ≤ 𝜖𝑓 .
• told - The tolerance used for stopping when changes to the unknown variables has absolute length less
than told, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑑 .
• tolx - The tolerance used for stopping when changes to the unknown variables has relative length less
than tolx, i.e. ‖∆⃗𝑥‖ ≤ 𝜖𝑥 · ‖⃗𝑥‖.
• maxIter - The maximum number of iterations to use
• verbose - True to have DQED print extra information about the solve, False to only see printed
output when the solver has an error.
solve()
Using the initial guess x0, return the least-squares solution to the set of nonlinear algebraic equations
defined by the evaluate() method of the derived class. This is the method that actually conducts the
call to DQED. Returns the solution vector and a flag indicating the status of the solve. The possible output
values of the flag are:

Value Meaning
2 The norm of the residual is zero; the solution vector is a root of the system
3 The bounds on the trust region are being encountered on each step; the solution vector may or
may not be a local minimum
4 The solution vector is a local minimum
5 A significant amount of noise or uncertainty has been observed in the residual; the solution may
or may not be a local minimum
6 The solution vector is only changing by small absolute amounts; the solution may or may not
be a local minimum
7 The solution vector is only changing by small relative amounts; the solution may or may not be
a local minimum
8 The maximum number of iterations has been reached; the solution is the best found, but may or
may not be a local minimum
9-18 An error occurred during the solve operation; the solution is not a local minimum

58 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.data.statmech.StatmechGroups

class rmgpy.data.statmech.StatmechGroups(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with an RMG statistical mechanics (frequencies) group database.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldLibraryEntry(data)
Return a list of values used to save entries to the old-style RMG thermo database based on the thermody-
namics object data.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getFrequencyGroups(molecule)
Return the set of characteristic group frequencies corresponding to the speficied molecule. This is done by
searching the molecule for certain functional groups for which characteristic frequencies are known, and
using those frequencies.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
getStatmechData(molecule, thermoModel)
Use the previously-loaded frequency database to generate a set of characteristic group frequencies corre-
sponding to the speficied molecule. The provided thermo data in thermoModel is used to fit some frequen-
cies and all hindered rotors to heat capacity data.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.

1.4. Database (rmgpy.data) 59


RMG-Py API Reference, Release 2.4.1

loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
processOldLibraryEntry(data)
Process a list of parameters data as read from an old-style RMG statmech database, returning the corre-
sponding thermodynamics object.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.

60 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.statmech.StatmechLibrary

class rmgpy.data.statmech.StatmechLibrary(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with a RMG statistical mechanics (frequencies) library.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldLibraryEntry(data)
Return a list of values used to save entries to the old-style RMG thermo database based on the thermody-
namics object data.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.

1.4. Database (rmgpy.data) 61


RMG-Py API Reference, Release 2.4.1

load(path, local_context=None, global_context=None)


Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.

62 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

processOldLibraryEntry(data)
Process a list of parameters data as read from an old-style RMG thermo database, returning the corre-
sponding thermodynamics object.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.kinetics.TemplateReaction

class rmgpy.data.kinetics.TemplateReaction(index=-1, reactants=None, products=None, speci-


ficCollider=None, kinetics=None, reversible=True,
transitionState=None, duplicate=False, degener-
acy=1, pairs=None, family=None, template=None,
estimator=None, reverse=None, is_forward=None)
A Reaction object generated from a reaction family template. In addition to attributes inherited from Reaction,
this class includes the following attributes:

Attribute Type Description


family str The kinetics family that the reaction was created from.
estimator str Whether the kinetics came from rate rules or group additivity.
reverse TemplateReaction The reverse reaction, for families that are their own reverse.
is_forward bool Whether the reaction was generated in the forward direction of the fam-
ily.

allow_max_rate_violation
‘bool’
Type allow_max_rate_violation
allow_pdep_route
‘bool’
Type allow_pdep_route

1.4. Database (rmgpy.data) 63


RMG-Py API Reference, Release 2.4.1

calculateMicrocanonicalRateCoefficient(self, ndarray Elist, ndarray Jlist, ndarray reac-


DensStates, ndarray prodDensStates=None, double
T=0.0)
Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol.
reacDensStates and prodDensStates are the densities of states of the reactant and product configurations
for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction
is reversible, then both are required. This function will try to use the best method that it can based on the
input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of free-
dom), then RRKM theory will be used.
• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the
inverse Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also
be provided. For isomerization and association reactions prodDensStates is required; for dissociation
reactions it is optional. The temperature is used if provided in the detailed balance expression to determine
the reverse kinetics, and in certain cases in the inverse Laplace transform method.
calculateTSTRateCoefficient(self, double T ) → double
Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature
T in K using (canonical) transition state theory. The TST equation is

𝑄‡ (𝑇 )
(︂ )︂
𝑘B 𝑇 𝐸0
𝑘(𝑇 ) = 𝜅(𝑇 ) exp −
ℎ 𝑄A (𝑇 )𝑄B (𝑇 ) 𝑘B 𝑇

where 𝑄‡ is the partition function of the transition state, 𝑄A and 𝑄B are the partition function of the
reactants, 𝐸0 is the ground-state energy difference from the transition state to the reactants, 𝑇 is the
absolute temperature, 𝑘B is the Boltzmann constant, and ℎ is the Planck constant. 𝜅(𝑇 ) is an optional
tunneling correction.
calculateTSTRateCoefficients(self, ndarray Tlist) → ndarray

calculate_coll_limit(self, float temp, bool reverse=False)


Calculate the collision limit rate for the given temperature implemented as recommended in Wang et al.
doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)
canTST(self ) → bool
Return True if the necessary parameters are available for using transition state theory – or the microcanon-
ical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.
check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) → list
Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the
relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the
reaction object and the direction in which the violation was detected.
comment
str
Type comment
copy()
creates a new instance of TemplateReaction
degeneracy
The reaction path degeneracy for this reaction.
If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new
degeneracy to the old degeneracy.

64 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

draw(self, path)
Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify
the file to save the generated image to; the image type is automatically determined by extension. Valid
extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
duplicate
‘bool’
Type duplicate
elementary_high_p
‘bool’
Type elementary_high_p
ensure_species(self, bool reactant_resonance=False, bool product_resonance=False)
Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found
to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.
Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or
product_resonance, are True. Does not generate resonance for reactants or products that start as Species
objects.
fixBarrierHeight(self, bool forcePositive=False)
Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least
the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi
with an exothermic reaction. If forcePositive is True, then all reactions are forced to have a non-negative
barrier.
fixDiffusionLimitedA(self, T )
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the
specified temperature.
generate3dTS(self, reactants, products)
Generate the 3D structure of the transition state. Called from model.generateKinetics().
self.reactants is a list of reactants self.products is a list of products
generatePairs(self )
Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact
procedure for doing so depends on the reaction type:

Reaction type Template Resulting pairs


Isomerization A -> C (A,C)
Dissociation A -> C + D (A,C), (A,D)
Association A + B -> C (A,C), (B,C)
Bimolecular A + B -> C + D (A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a
simple similarity analysis by comparing the number of heavy atoms (C/O/N/S at the moment). This should
work most of the time, but a more rigorous algorithm may be needed for some cases.
generateReverseRateCoefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None)
Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the
kinetics attribute is one of several (but not necessarily all) kinetics types.
getEnthalpiesOfReaction(self, ndarray Tlist) → ndarray
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.

1.4. Database (rmgpy.data) 65


RMG-Py API Reference, Release 2.4.1

getEnthalpyOfReaction(self, double T ) → double


Return the enthalpy of reaction in J/mol evaluated at temperature T in K.
getEntropiesOfReaction(self, ndarray Tlist) → ndarray
Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
getEntropyOfReaction(self, double T ) → double
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
getEquilibriumConstant(self, double T, str type=’Kc’) → double
Return the equilibrium constant for the reaction at the specified temperature T in K. The type parameter
lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getEquilibriumConstants(self, ndarray Tlist, str type=’Kc’) → ndarray
Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parame-
ter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getFreeEnergiesOfReaction(self, ndarray Tlist) → ndarray
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
getFreeEnergyOfReaction(self, double T ) → double
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.
getRateCoefficient(self, double T, double P=0) → double
Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa,
including any reaction path degeneracies.
If diffusionLimiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct
the rate. If not, then use the intrinsic rate coefficient.
getSource()
Return the database that was the source of this reaction. For a TemplateReaction this should be a Kinetic-
sGroups object.
getStoichiometricCoefficient(self, Species spec) → int
Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is
increased by one for each time spec appears as a product and decreased by one for each time spec appears
as a reactant.
getSurfaceRateCoefficient(self, double T, double surfaceSiteDensity) → double
Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site
density surfaceSiteDensity in mol/m2. Value is returned in combination of [m,mol,s]
getURL(self )
Get a URL to search for this reaction in the rmg website.
get_mean_sigma_and_epsilon(self, bool reverse=False)
Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon)
using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the
products
get_reduced_mass(self, bool reverse=False)
Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if
reverse is True
hasTemplate(self, list reactants, list products) → bool
Return True if the reaction matches the template of reactants and products, which are both lists of
Species objects, or False if not.

66 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

index
‘int’
Type index
isAssociation(self ) → bool
−−
Return True if the reaction represents an association reaction A + B ↽−⇀
− C or False if not.
isBalanced(self ) → bool
Return True if the reaction has the same number of each atom on each side of the reaction equation, or
False if not.
isDissociation(self ) → bool
−−
Return True if the reaction represents a dissociation reaction A ↽−⇀
− B + C or False if not.
isIsomerization(self ) → bool
Return True if the reaction represents an isomerization reaction A −
↽−
−⇀
− B or False if not.
isIsomorphic(self, Reaction other, bool eitherDirection=True, bool checkIdentical=False, bool
checkOnlyLabel=False, bool checkTemplateRxnProducts=False, bool generateIni-
tialMap=False, bool strict=True) → bool
Return True if this reaction is the same as the other reaction, or False if they are different. The compar-
ison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.
Parameters
• eitherDirection (bool, optional) – if False,then the reaction direction must
match.
• checkIdentical (bool, optional) – if True, check that atom ID’s match (used for
checking degeneracy)
• checkOnlyLabel (bool, optional) – if True, only check the string representation,
ignoring molecular structure comparisons
• checkTemplateRxnProducts (bool, optional) – if True, only check isomorphism
of reaction products (used when we know the reactants are identical, i.e. in generating
reactions)
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isSurfaceReaction(self ) → bool
Return True if one or more reactants or products are surface species (or surface sites)
isUnimolecular(self ) → bool
Return True if the reaction has a single molecule as either reactant or product (or both) A −
↽−
−⇀
− B + C or
A+B− −⇀
↽−− C or A −−⇀
↽−− B, or False if not.
is_forward
‘bool’
Type is_forward
k_effective_cache
dict
Type k_effective_cache
kinetics
rmgpy.kinetics.model.KineticsModel
Type kinetics

1.4. Database (rmgpy.data) 67


RMG-Py API Reference, Release 2.4.1

label
str
Type label
matchesSpecies(self, list reactants, list products=None) → bool
Compares the provided reactants and products against the reactants and products of this reaction. Both
directions are checked.
Parameters
• reactants (list) – Species required on one side of the reaction
• products (list, optional) – Species required on the other side
network_kinetics
rmgpy.kinetics.arrhenius.Arrhenius
Type network_kinetics
pairs
list
Type pairs
products
list
Type products
rank
object
Type rank
reactants
list
Type reactants
reverseThisArrheniusRate(self, Arrhenius kForward, str reverseUnits, Tmin=None, Tmax=None)
Reverses the given kForward, which must be an Arrhenius type. You must supply the correct units for the
reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
reversible
‘bool’
Type reversible
specificCollider
rmgpy.species.Species
Type specificCollider
toCantera(self, speciesList=None, useChemkinIdentifier=False)
Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self, speciesList=None, kinetics=True)
Return the chemkin-formatted string for this reaction.
If kinetics is set to True, the chemkin format kinetics will also be returned (requires the speciesList to
figure out third body colliders.) Otherwise, only the reaction string will be returned.

68 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

toLabeledStr(self, use_index=False)
the same as __str__ except that the labels are assumed to exist and used for reactant and products rather
than the labels plus the index in parentheses
transitionState
rmgpy.species.TransitionState
Type transitionState

rmgpy.data.thermo.ThermoDatabase

class rmgpy.data.thermo.ThermoDatabase
A class for working with the RMG thermodynamics database.
computeGroupAdditivityThermo(molecule)
Return the set of thermodynamic parameters corresponding to a given Molecule object molecule by esti-
mation using the group additivity values. If no group additivity values are loaded, a DatabaseError is
raised.
The entropy is not corrected for the symmetry of the molecule. This should be done later by the calling
function.
correctBindingEnergy(thermo, species)
Changes the provided thermo, by applying a linear scaling relation to correct the adsorption energy.
Parameters
• thermo – starting thermo data
• species – the species (which is an adsorbate)
Returns corrected thermo
estimateRadicalThermoViaHBI(molecule, stableThermoEstimator)
Estimate the thermodynamics of a radical by saturating it, applying the provided stableThermoEstimator
method on the saturated species, then applying hydrogen bond increment corrections for the radical site(s)
and correcting for the symmetry.
No entropy is included in the returning term. This should be done later by the calling function.
estimateThermoViaGroupAdditivity(molecule)
Return the set of thermodynamic parameters corresponding to a given Molecule object molecule by esti-
mation using the group additivity values. If no group additivity values are loaded, a DatabaseError is
raised.
The entropy is not corrected for the symmetry of the molecule. This should be done later by the calling
function.
extractSourceFromComments(species)
species: A species object containing thermo data and thermo data comments
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 ‘Library’, ‘QM’, and/or ‘GAV’. Commonly, species thermo are
estimated using only one of these sources. However, a radical can be estimated with more than one type
of source, for instance a saturated library value and a GAV HBI correction, or a QM saturated value and a
GAV HBI correction.
source = {‘Library’: String_Name_of_Library_Used, ‘QM’: String_of_Method_Used, ‘GAV’: Dic-
tionary_of_Groups_Used }

1.4. Database (rmgpy.data) 69


RMG-Py API Reference, Release 2.4.1

The Dictionary_of_Groups_Used looks like {‘groupType’:[List of tuples containing (Entry, Weight)]


getAllThermoData(species)
Return all possible sets of thermodynamic parameters for a given Species object species. The hits from
the depository come first, then the libraries (in order), and then the group additivity estimate. This method
is useful for a generic search job.
Returns: a list of tuples (ThermoData, source, entry) (Source is a library or depository, or None)
getRingGroupsFromComments(thermoData)
Takes a string of comments from group additivity estimation, and extracts the ring and polycyclic ring
groups from them, returning them as lists.
getThermoData(species, trainingSet=None)
Return the thermodynamic parameters for a given Species object species. This function first searches
the loaded libraries in order, returning the first match found, before falling back to estimation via machine
learning and then group additivity.
The method corrects for symmetry when the molecule uses machine learning or group additivity. Libraries
and direct QM calculations are already corrected.
Returns: ThermoData
getThermoDataForSurfaceSpecies(species)
Get the thermo data for an adsorbed species, by desorbing it, finding the thermo of the gas-phase species,
then adding an adsorption correction that is found from the groups/adsorption tree. Does not apply linear
scaling relationship.
Returns a ThermoData object, with no Cp0 or CpInf
getThermoDataFromDepository(species)
Return all possible sets of thermodynamic parameters for a given Species object species from the depos-
itory. If no depository is loaded, a DatabaseError is raised.
Returns: a list of tuples (thermoData, depository, entry) without any Cp0 or CpInf data.
getThermoDataFromGroups(species)
Return the set of thermodynamic parameters corresponding to a given Species object species by esti-
mation using the group additivity values. If no group additivity values are loaded, a DatabaseError is
raised.
The resonance isomer (molecule) with the lowest H298 is used, and as a side-effect the resonance isomers
(items in species.molecule list) are sorted in ascending order.
This does not account for symmetry. The method calling this sould correct for it.
Returns: ThermoData
getThermoDataFromLibraries(species, trainingSet=None)
Return the thermodynamic parameters for a given Species object species. This function first searches the
loaded libraries in order, returning the first match found, before failing and returning None. trainingSet is
used to identify if function is called during training set or not. During training set calculation we want to
use gas phase thermo to not affect reverse rate calculation.
Returns: ThermoData or None
getThermoDataFromLibrary(species, library)
Return the set of thermodynamic parameters corresponding to a given Species object species from the
specified thermodynamics library. If library is a string, the list of libraries is searched for a library with
that name. If no match is found in that library, None is returned. If no corresponding library is found, a
DatabaseError is raised.

Returns a tuple: (ThermoData, library, entry) or None.

70 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

get_thermo_data_from_ml(species, ml_estimator, ml_settings)


Return the set of thermodynamic parameters corresponding to a given Species object species by estima-
tion using the ML estimator. Also compare the estimated uncertainties to the user-defined cutoffs. If any
of the uncertainties are larger than their corresponding cutoffs, return None. Also check all other options
in ml_settings.
For HBI, the resonance isomer with the lowest H298 is used and the resonance isomers in species are
sorted in ascending order.
The entropy is not corrected for the symmetry of the molecule. This should be done later by the calling
function.
load(path, libraries=None, depository=True)
Load the thermo database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadDepository(path)
Load the thermo database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadGroups(path)
Load the thermo database from the given path on disk, where path points to the top-level folder of the
thermo database.
loadLibraries(path, libraries=None)
Load the thermo database from the given path on disk, where path points to the top-level folder of the
thermo database.
If no libraries are given, all are loaded.
loadOld(path)
Load the old RMG thermo database from the given path on disk, where path points to the top-level folder
of the old RMG database.
prioritizeThermo(species, thermoDataList)
Use some metrics to reorder a list of thermo data from best to worst. Return a list of indices with the
desired order associated with the index of thermo from the data list.
pruneHeteroatoms(allowed=[’C’, ’H’, ’O’, ’S’])
Remove all species from thermo libraries that contain atoms other than those allowed.
This is useful before saving the database for use in RMG-Java
recordPolycylicGenericNodes()
Identify generic nodes in tree for polycyclic groups. Saves them as a list in the genericNodes attribute in
the polycyclic ThermoGroups object, which must be pre-loaded.
Necessary for polycyclic heuristic.
recordRingGenericNodes()
Identify generic nodes in tree for ring groups. Saves them as a list in the genericNodes attribute in the ring
ThermoGroups object, which must be pre-loaded.

Necessary for polycyclic heuristic.


save(path)
Save the thermo database to the given path on disk, where path points to the top-level folder of the thermo
database.
saveDepository(path)
Save the thermo depository to the given path on disk, where path points to the top-level folder of the
thermo depository.

1.4. Database (rmgpy.data) 71


RMG-Py API Reference, Release 2.4.1

saveGroups(path)
Save the thermo groups to the given path on disk, where path points to the top-level folder of the thermo
groups.
saveLibraries(path)
Save the thermo libraries to the given path on disk, where path points to the top-level folder of the thermo
libraries.
saveOld(path)
Save the old RMG thermo database to the given path on disk, where path points to the top-level folder of
the old RMG database.
setDeltaAtomicAdsorptionEnergies(bindingEnergies=None)
Sets and stores the change in atomic binding energy between the desired and the Pt(111) default.
This depends on the two metal surfaces: the reference one used in the database of adsorption energies, and
the desired surface.
If bindingEnergies are not provided, resets the values to those of the Pt(111) default.
Parameters bindingEnergies (dict, optional) – the desired binding energies with ele-
ments as keys and binding energy/unit tuples as values
Returns None, stores result in self.deltaAtomicAdsorptionEnergy

rmgpy.data.thermo.ThermoDepository

class rmgpy.data.thermo.ThermoDepository(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with the RMG thermodynamics depository.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.

72 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

load(path, local_context=None, global_context=None)


Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.

1.4. Database (rmgpy.data) 73


RMG-Py API Reference, Release 2.4.1

removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.thermo.ThermoGroups

class rmgpy.data.thermo.ThermoGroups(label=”, name=”, shortDesc=”, longDesc=”)


A class for working with an RMG thermodynamics group additivity database.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.
copyData(source, destination)
This method copys the ThermoData object and all meta data from source to destination :param source:
The entry for which data is being copied :param destination: The entry for which data is being overwritten
descendTree(structure, atoms, root=None, strict=False)
Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldLibraryEntry(data)
Return a list of values used to save entries to the old-style RMG thermo database based on the thermody-
namics object data.

74 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.
matchNodeToStructure(node, structure, atoms, strict=False)
Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

1.4. Database (rmgpy.data) 75


RMG-Py API Reference, Release 2.4.1

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
processOldLibraryEntry(data)
Process a list of parameters data as read from an old-style RMG thermo database, returning the corre-
sponding thermodynamics object.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. For thermo groups we also, need to re-point any
unicode thermoData that may have pointed to the entry.
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

rmgpy.data.thermo.ThermoLibrary

class rmgpy.data.thermo.ThermoLibrary(label=”, name=”, solvent=None, shortDesc=”,


longDesc=”)
A class for working with a RMG thermodynamics library.
ancestors(node)
Returns all the ancestors of a node, climbing up the tree to the top.
areSiblings(node, nodeOther)
Return True if node and nodeOther have the same parent node. Otherwise, return False. Both node and
nodeOther must be Entry types with items containing Group or LogicNode types.

76 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

descendTree(structure, atoms, root=None, strict=False)


Descend the tree in search of the functional group node that best matches the local structure around atoms
in structure.
If root=None then uses the first matching top node.
Returns None if there is no matching root.
Set strict to True if all labels in final matched node must match that of the structure. This is used in
kinetics groups to find the correct reaction template, but not generally used in other GAVs due to species
generally not being prelabeled.
descendants(node)
Returns all the descendants of a node, climbing down the tree to the bottom.
generateOldLibraryEntry(data)
Return a list of values used to save entries to the old-style RMG thermo database based on the thermody-
namics object data.
generateOldTree(entries, level)
Generate a multi-line string representation of the current tree using the old-style syntax.
getEntriesToSave()
Return a sorted list of the entries in this database that should be saved to the output file.
Then renumber the entry indexes so that we never have any duplicate indexes.
getSpecies(path, resonance=True)
Load the dictionary containing all of the species in a kinetics library or depository.
load(path, local_context=None, global_context=None)
Load an RMG-style database from the file at location path on disk. The parameters local_context and
global_context are used to provide specialized mapping of identifiers in the input file to corresponding
functions to evaluate. This method will automatically add a few identifiers required by all data entries, so
you don’t need to provide these.
loadOld(dictstr, treestr, libstr, numParameters, numLabels=1, pattern=True)
Load a dictionary-tree-library based database. The database is stored in three files: dictstr is the path to
the dictionary, treestr to the tree, and libstr to the library. The tree is optional, and should be set to ‘’ if not
desired.
loadOldDictionary(path, pattern)
Parse an old-style RMG database dictionary located at path. An RMG dictionary is a list of key-value
pairs of a one-line string key and a multi-line string value. Each record is separated by at least one empty
line. Returns a dict object with the values converted to Molecule or Group objects depending on the
value of pattern.
loadOldLibrary(path, numParameters, numLabels=1)
Parse an RMG database library located at path.
loadOldTree(path)
Parse an old-style RMG database tree located at path. An RMG tree is an n-ary tree representing the
hierarchy of items in the dictionary.
matchNodeToChild(parentNode, childNode)
Return True if parentNode is a parent of childNode. Otherwise, return False. Both parentNode and
childNode must be Entry types with items containing Group or LogicNode types. If parentNode and
childNode are identical, the function will also return False.
matchNodeToNode(node, nodeOther)
Return True if node and nodeOther are identical. Otherwise, return False. Both node and nodeOther must
be Entry types with items containing Group or LogicNode types.

1.4. Database (rmgpy.data) 77


RMG-Py API Reference, Release 2.4.1

matchNodeToStructure(node, structure, atoms, strict=False)


Return True if the structure centered at atom matches the structure at node in the dictionary. The structure
at node should have atoms with the appropriate labels because they are set on loading and never change.
However, the atoms in structure may not have the correct labels, hence the atoms parameter. The atoms
parameter may include extra labels, and so we only require that every labeled atom in the functional group
represented by node has an equivalent labeled atom in structure.
Matching to structure is more strict than to node. All labels in structure must be found in node. However
the reverse is not true, unless strict is set to True.

At- Description
tribute
node Either an Entry or a key in the self.entries dictionary which has a Group or LogicNode as its
Entry.item
struc- A Group or a Molecule
ture
atoms Dictionary of {label: atom} in the structure. A possible dictionary is the one produced by
structure.getLabeledAtoms()
strict If set to True, ensures that all the node’s atomLabels are matched by in the structure

parseOldLibrary(path, numParameters, numLabels=1)


Parse an RMG database library located at path, returning the loaded entries (rather than storing them in
the database). This method does not discard duplicate entries.
processOldLibraryEntry(data)
Process a list of parameters data as read from an old-style RMG thermo database, returning the corre-
sponding thermodynamics object.
removeGroup(groupToRemove)
Removes a group that is in a tree from the database. In addition to deleting from self.entries, it must also
update the parent/child relationships
Returns the removed group
save(path)
Save the current database to the file at location path on disk.
saveDictionary(path)
Extract species from all entries associated with a kinetics library or depository and save them to the path
given.
saveEntry(f, entry)
Write the given entry in the thermo database to the file object f.
saveOld(dictstr, treestr, libstr)
Save the current database to a set of text files using the old-style syntax.
saveOldDictionary(path)
Save the current database dictionary to a text file using the old-style syntax.
saveOldLibrary(path)
Save the current database library to a text file using the old-style syntax.
saveOldTree(path)
Save the current database tree to a text file using the old-style syntax.

78 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.5 Kinetics (rmgpy.kinetics)

The rmgpy.kinetics subpackage contains classes that represent various kinetics models of chemical reaction rates
and models of quantum mechanical tunneling through an activation barrier.

1.5.1 Pressure-independent kinetics models

Class Description
KineticsData A kinetics model based on a set of discrete rate coefficient points in temperature
Arrhenius A kinetics model based on the (modified) Arrhenius expression
MultiArrhenius A kinetics model based on a sum of Arrhenius expressions

1.5.2 Pressure-dependent kinetics models

Class Description
PDepKineticsData A kinetics model based on a set of discrete rate coefficient points in temperature and pres-
sure
PDepArrhenius A kinetics model based on a set of Arrhenius expressions for a range of pressures
MultiPDepArrheniusA kinetics model based on a sum of PDepArrhenius expressions
Chebyshev A kinetics model based on a Chebyshev polynomial representation
ThirdBody A low pressure-limit kinetics model based on the (modified) Arrhenius expression, with a
third body
Lindemann A kinetics model of pressure-dependent falloff based on the Lindemann model
Troe A kinetics model of pressure-dependent falloff based on the Lindemann model with the
Troe falloff factor

1.5.3 Tunneling models

Class Description
Wigner A one-dimensional tunneling model based on the Wigner expression
Eckart A one-dimensional tunneling model based on the (asymmetric) Eckart expression

rmgpy.kinetics.KineticsData

class rmgpy.kinetics.KineticsData(Tdata=None, kdata=None, Tmin=None, Tmax=None,


Pmin=None, Pmax=None, comment=”)
A kinetics model based on an array of rate coefficient data vs. temperature. The attributes are:

Attribute Description
Tdata An array of temperatures at which rate coefficient values are known
kdata An array of rate coefficient values
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

1.5. Kinetics (rmgpy.kinetics) 79


RMG-Py API Reference, Release 2.4.1

Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tdata
An array of temperatures at which rate coefficient values are known.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
getRateCoefficient(self, double T, double P=0.0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K.
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if the kdata and Tdata match. Returns False otherwise.
isPressureDependent(self ) → bool
Return False since, by default, all objects derived from KineticsModel represent pressure-independent
kinetics.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
kdata
An array of rate coefficient values.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the kinetics for a cantera reaction object.
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.Arrhenius

class rmgpy.kinetics.Arrhenius(A=None, n=0.0, Ea=None, T0=(1.0, ’K’), Tmin=None, Tmax=None,


Pmin=None, Pmax=None, comment=”)
A kinetics model based on the (modified) Arrhenius equation. The attributes are:

80 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Description
A The preexponential factor
T0 The reference temperature
n The temperature exponent
Ea The activation energy
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

The Arrhenius equation, given below, accurately reproduces the kinetics of many reaction families:
(︂ )︂𝑛 (︂ )︂
𝑇 𝐸a
𝑘(𝑇 ) = 𝐴 exp −
𝑇0 𝑅𝑇

Above, 𝐴 is the preexponential factor, 𝑇0 is the reference temperature, 𝑛 is the temperature exponent, and 𝐸a is
the activation energy.
A
The preexponential factor.
Ea
The activation energy.
Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
T0
The reference temperature.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
changeRate(self, double factor)
Changes A factor in Arrhenius expression by multiplying it by a factor.
changeT0(self, double T0)
Changes the reference temperature used in the exponent to T0 in K, and adjusts the preexponential factor
accordingly.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
fitToData(self, ndarray Tlist, ndarray klist, str kunits, double T0=1, ndarray weights=None, bool three-
Params=True)
Fit the Arrhenius parameters to a set of rate coefficient data klist in units of kunits corresponding to a set
of temperatures Tlist in K. A linear least-squares fit is used, which guarantees that the resulting parameters
provide the best possible approximation to the data.

1.5. Kinetics (rmgpy.kinetics) 81


RMG-Py API Reference, Release 2.4.1

getRateCoefficient(self, double T, double P=0.0) → double


Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K.
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if kinetics matches that of another kinetics model. Must match temperature and pressure
range of kinetics model, as well as parameters: A, n, Ea, T0. (Shouldn’t have pressure range if it’s
Arrhenius.) Otherwise returns False.
isPressureDependent(self ) → bool
Return False since, by default, all objects derived from KineticsModel represent pressure-independent
kinetics.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
n
The temperature exponent.
setCanteraKinetics(self, ctReaction, speciesList)
Passes in a cantera ElementaryReaction() object and sets its rate to a Cantera Arrhenius() object.
toArrheniusEP(self, double alpha=0.0, double dHrxn=0.0) → ArrheniusEP
Converts an Arrhenius object to ArrheniusEP
If setting alpha, you need to also input dHrxn, which must be given in J/mol (and vise versa).
toCanteraKinetics(self )
Converts the Arrhenius object to a cantera Arrhenius object
Arrhenius(A,b,E) where A is in units of m^3/kmol/s, b is dimensionless, and E is in J/kmol
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.MultiArrhenius

class rmgpy.kinetics.MultiArrhenius(arrhenius=None, Tmin=None, Tmax=None, Pmin=None,


Pmax=None, comment=”)
A kinetics model based on a set of (modified) Arrhenius equations, which are summed to obtain the overall rate.
The attributes are:

Attribute Description
arrhenius A list of the Arrhenius kinetics
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.

82 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
arrhenius
list
Type arrhenius
changeRate(self, double factor)
Change kinetics rate by a multiple factor.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
getRateCoefficient(self, double T, double P=0.0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K.
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if kinetics matches that of another kinetics model. Each duplicate reaction must be matched
and equal to that in the other MultiArrhenius model in the same order. Otherwise returns False
isPressureDependent(self ) → bool
Return False since, by default, all objects derived from KineticsModel represent pressure-independent
kinetics.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the kinetic rates for a list of cantera Reaction objects Here, ctReaction must be a list rather than a
single cantera reaction.
toArrhenius(self, double Tmin=-1, double Tmax=-1) → Arrhenius
Return an Arrhenius instance of the kinetics model
Fit the Arrhenius parameters to a set of rate coefficient data generated from the MultiArrhenius kinetics,
over the temperature range Tmin to Tmax, in Kelvin. If Tmin or Tmax are unspecified (or -1) then the
MultiArrhenius’s Tmin and Tmax are used. A linear least-squares fit is used, which guarantees that the
resulting parameters provide the best possible approximation to the data.
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.PDepKineticsData

class rmgpy.kinetics.PDepKineticsData(Tdata=None, Pdata=None, kdata=None, Tmin=None,


Tmax=None, Pmin=None, Pmax=None, comment=”)
A kinetics model based on an array of rate coefficient data vs. temperature and pressure. The attributes are:

1.5. Kinetics (rmgpy.kinetics) 83


RMG-Py API Reference, Release 2.4.1

Attribute Description
Tdata An array of temperatures at which rate coefficient values are known
Pdata An array of pressures at which rate coefficient values are known
kdata An array of rate coefficient values at each temperature and pressure
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

Pdata
An array of pressures at which rate coefficient values are known.
Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tdata
An array of temperatures at which rate coefficient values are known.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0.0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K and
pressure P in Pa.
highPlimit
rmgpy.kinetics.model.KineticsModel

84 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if the kdata and Tdata match. Returns False otherwise.
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
kdata
An array of rate coefficient values at each temperature and pressure.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the kinetics for a cantera reaction object.
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.PDepArrhenius

class rmgpy.kinetics.PDepArrhenius(pressures=None, arrhenius=None, highPlimit=None,


Tmin=None, Tmax=None, Pmin=None, Pmax=None, com-
ment=”)
A kinetic model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) where a set of Arrhenius kinetics are stored at
a variety of pressures and interpolated between on a logarithmic scale. The attributes are:

Attribute Description
pressures The list of pressures
arrhenius The list of Arrhenius objects at each pressure
Tmin The minimum temperature in K at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature in K at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure in bar at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure in bar at which the model is valid, or zero if unknown or undefined
efficiencies A dict associating chemical species with associated efficiencies
order The reaction order (1 = first, 2 = second, etc.)
comment Information about the model (e.g. its source)

The pressure-dependent Arrhenius formulation is sometimes used to extend the Arrhenius expression to handle
pressure-dependent kinetics. The formulation simply parameterizes 𝐴, 𝑛, and 𝐸a to be dependent on pressure:
(︂ )︂𝑛(𝑃 ) (︂ )︂
𝑇 𝐸a (𝑃 )
𝑘(𝑇, 𝑃 ) = 𝐴(𝑃 ) exp −
𝑇0 𝑅𝑇

Although this suggests some physical insight, the 𝑘(𝑇, 𝑃 ) data is often highly complex and non-Arrhenius,
limiting the usefulness of this formulation to simple systems.

1.5. Kinetics (rmgpy.kinetics) 85


RMG-Py API Reference, Release 2.4.1

Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
arrhenius
list
Type arrhenius
changeRate(self, double factor)
Changes kinetics rate by a multiple factor.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
fitToData(self, ndarray Tlist, ndarray Plist, ndarray K, str kunits, double T0=1)
Fit the pressure-dependent Arrhenius model to a matrix of rate coefficient data K with units of kunits
corresponding to a set of temperatures Tlist in K and pressures Plist in Pa. An Arrhenius model is fit cpdef
changeRate(self, double factor)at each pressure.
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K and
pressure P in Pa.
highPlimit
rmgpy.kinetics.model.KineticsModel
Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if kinetics matches that of another kinetics model. Each duplicate reaction must be matched
and equal to that in the other PDepArrhenius model in the same order. Otherwise returns False

86 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
pressures
The list of pressures.
setCanteraKinetics(self, ctReaction, speciesList)
Sets a Cantera PlogReaction()’s rates attribute with A list of tuples containing [(pressure in Pa, cantera
arrhenius object), (..)]
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.MultiPDepArrhenius

class rmgpy.kinetics.MultiPDepArrhenius(arrhenius=None, Tmin=None, Tmax=None,


Pmin=None, Pmax=None, comment=”)
A kinetic model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) where sets of Arrhenius kinetics are stored at a
variety of pressures and interpolated between on a logarithmic scale. The attributes are:

Attribute Description
arrhenius A list of the PDepArrhenius kinetics at each temperature
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
arrhenius
list
Type arrhenius
changeRate(self, double factor)
Change kinetic rate by a multiple factor.

1.5. Kinetics (rmgpy.kinetics) 87


RMG-Py API Reference, Release 2.4.1

comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0.0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K and
pressure P in Pa.
highPlimit
rmgpy.kinetics.model.KineticsModel
Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Returns True if kinetics matches that of another kinetics model. Each duplicate reaction must be matched
and equal to that in the other MultiArrhenius model in the same order. Otherwise returns False
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the PLOG kinetics for multiple cantera Reaction objects, provided in a list. ctReaction is a list of
cantera reaction objects.
toHTML(self )
Return an HTML rendering.

88 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.kinetics.Chebyshev

class rmgpy.kinetics.Chebyshev(coeffs=None, kunits=”, highPlimit=None, Tmin=None, Tmax=None,


Pmin=None, Pmax=None, comment=”)
A model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) using a set of Chebyshev polynomials in temperature
and pressure. The attributes are:

Attribute Description
coeffs Matrix of Chebyshev coefficients, such that the resulting 𝑘(𝑇, 𝑃 ) has units of cm^3, mol, s
kunits The units of the rate coefficient
degreeT The number of terms in the inverse temperature direction
degreeP The number of terms in the log pressure direction
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

The Chebyshev polynomial formulation is a means of fitting a wide range of complex 𝑘(𝑇, 𝑃 ) behavior. How-
ever, there is no meaningful physical interpretation of the polynomial-based fit, and one must take care to
minimize the magnitude of Runge’s phenomenon. The formulation is as follows:
𝑁𝑇 ∑︁
∑︁ 𝑁𝑃
log 𝑘(𝑇, 𝑃 ) = 𝛼𝑡𝑝 𝜑𝑡 (𝑇˜)𝜑𝑝 (𝑃˜ )
𝑡=1 𝑝=1

Above, 𝛼𝑡𝑝 is a constant, 𝜑𝑛 (𝑥) is the Chebyshev polynomial of degree 𝑛 evaluated at 𝑥, and
−1
2𝑇 −1 − 𝑇min −1
− 𝑇max
𝑇˜ ≡ −1 −1
𝑇max − 𝑇min

2 log 𝑃 − log 𝑃min − log 𝑃max


𝑃˜ ≡
log 𝑃max − log 𝑃min
are reduced temperature and reduced pressure designed to map the ranges (𝑇min , 𝑇max ) and (𝑃min , 𝑃max ) to
(−1, 1).
Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
changeRate(self, double factor)
Changes kinetics rates by a multiple factor.
coeffs
The Chebyshev coefficients.
comment
str
Type comment

1.5. Kinetics (rmgpy.kinetics) 89


RMG-Py API Reference, Release 2.4.1

degreeP
‘int’
Type degreeP
degreeT
‘int’
Type degreeT
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
fitToData(self, ndarray Tlist, ndarray Plist, ndarray K, str kunits, int degreeT, int degreeP, double
Tmin, double Tmax, double Pmin, double Pmax)
Fit a Chebyshev kinetic model to a set of rate coefficients K, which is a matrix corresponding to the
temperatures Tlist in K and pressures Plist in Pa. degreeT and degreeP are the degree of the polynomials
in temperature and pressure, while Tmin, Tmax, Pmin, and Pmax set the edges of the valid temperature
and pressure ranges in K and bar, respectively.
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0) → double
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K and
pressure P in Pa by evaluating the Chebyshev expression.
highPlimit
rmgpy.kinetics.model.KineticsModel
Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Checks to see if kinetics matches that of other kinetics and returns True if coeffs, kunits, Tmin,
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.

90 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

isTemperatureValid(self, double T ) → bool


Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
kunits
str
Type kunits
setCanteraKinetics(self, ctReaction, speciesList)
Sets the kinetics parameters for a Cantera ChebyshevReaction() object Uses
set_parameters(self,Tmin,Tmax,Pmin,Pmax,coeffs) where T’s are in units of K, P’s in units of Pa,
and coeffs is 2D array of (nTemperature, nPressure).
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.ThirdBody

class rmgpy.kinetics.ThirdBody(arrheniusLow=None, Tmin=None, Tmax=None, Pmin=None,


Pmax=None, efficiencies=None, comment=”)
A kinetic model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) using third-body kinetics. The attributes are:

Attribute Description
arrheniusLow The Arrhenius kinetics at the low-pressure limit
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
efficiencies A dict associating chemical species with associated efficiencies
comment Information about the model (e.g. its source)

Third-body kinetics simply introduce an inert third body to the rate expression:

𝑘(𝑇, 𝑃 ) = 𝑘0 (𝑇 )[M]

Above, [M] ≈ 𝑃/𝑅𝑇 is the concentration of the bath gas. This formulation is equivalent to stating that the
kinetics are always in the low-pressure limit.
Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
arrheniusLow
rmgpy.kinetics.arrhenius.Arrhenius
Type arrheniusLow
changeRate(self, double factor)
Changes kinetics rate by a multiple factor.

1.5. Kinetics (rmgpy.kinetics) 91


RMG-Py API Reference, Release 2.4.1

comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0.0) → double
Return the value of the rate coefficient 𝑘(𝑇 ) in units of m^3, mol, and s at the specified temperature
T in K and pressure P in Pa. If you wish to consider collision efficiencies, then you should first use
getEffectivePressure() to compute the effective pressure, and pass that value as the pressure to this
method.
highPlimit
rmgpy.kinetics.model.KineticsModel
Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Checks to see if kinetics matches that of other kinetics and returns True if coeffs, kunits, Tmin,
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the kinetics and efficiencies for a cantera ThreeBodyReaction object
toHTML(self )
Return an HTML rendering.

92 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.kinetics.Lindemann

class rmgpy.kinetics.Lindemann(arrheniusHigh=None, arrheniusLow=None, Tmin=None,


Tmax=None, Pmin=None, Pmax=None, efficiencies=None, com-
ment=”)
A kinetic model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) using the Lindemann formulation. The attributes
are:

Attribute Description
arrheniusHigh The Arrhenius kinetics at the high-pressure limit
arrheniusLow The Arrhenius kinetics at the low-pressure limit
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
efficiencies A dict associating chemical species with associated efficiencies
comment Information about the model (e.g. its source)

The Lindemann model qualitatively predicts the falloff of some simple pressure-dependent reaction kinetics.
The formulation is as follows:
[︂ ]︂
𝑃r
𝑘(𝑇, 𝑃 ) = 𝑘∞ (𝑇 )
1 + 𝑃r

where
𝑘0 (𝑇 )
𝑃r = [M]
𝑘∞ (𝑇 )
(︂ )︂
𝐸0
𝑘0 (𝑇 ) = 𝐴0 𝑇 𝑛0 exp −
𝑅𝑇
(︂ )︂
𝐸∞
𝑘∞ (𝑇 ) = 𝐴∞ 𝑇 𝑛∞ exp −
𝑅𝑇

and [M] ≈ 𝑃/𝑅𝑇 is the concentration of the bath gas. The Arrhenius expressions 𝑘0 (𝑇 ) and 𝑘∞ (𝑇 ) represent
the low-pressure and high-pressure limit kinetics, respectively.
Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
arrheniusHigh
rmgpy.kinetics.arrhenius.Arrhenius
Type arrheniusHigh
arrheniusLow
rmgpy.kinetics.arrhenius.Arrhenius
Type arrheniusLow

1.5. Kinetics (rmgpy.kinetics) 93


RMG-Py API Reference, Release 2.4.1

changeRate(self, double factor)


Changes kinetics rate by a multiple factor.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0.0) → double
Return the value of the rate coefficient 𝑘(𝑇 ) in units of m^3, mol, and s at the specified temperature
T in K and pressure P in Pa. If you wish to consider collision efficiencies, then you should first use
getEffectivePressure() to compute the effective pressure, and pass that value as the pressure to this
method.
highPlimit
rmgpy.kinetics.model.KineticsModel
Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Checks to see if kinetics matches that of other kinetics and returns True if coeffs, kunits, Tmin,
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the efficiencies and kinetics for a cantera reaction.
toHTML(self )
Return an HTML rendering.

94 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.kinetics.Troe

class rmgpy.kinetics.Troe(arrheniusHigh=None, arrheniusLow=None, alpha=0.0, T3=None,


T1=None, T2=None, Tmin=None, Tmax=None, Pmin=None, Pmax=None,
efficiencies=None, comment=”)
A kinetic model of a phenomenological rate coefficient 𝑘(𝑇, 𝑃 ) using the Troe formulation. The attributes are:

Attribute Description
arrheniusHigh The Arrhenius kinetics at the high-pressure limit
arrheniusLow The Arrhenius kinetics at the low-pressure limit
alpha The 𝛼 parameter
T1 The 𝑇1 parameter
T2 The 𝑇2 parameter
T3 The 𝑇3 parameter
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax The maximum pressure at which the model is valid, or zero if unknown or undefined
efficiencies A dict associating chemical species with associated efficiencies
comment Information about the model (e.g. its source)

The Troe model attempts to make the Lindemann model quantitative by introducing a broadening factor 𝐹 . The
formulation is as follows:
[︂ ]︂
𝑃r
𝑘(𝑇, 𝑃 ) = 𝑘∞ (𝑇 ) 𝐹
1 + 𝑃r
where
𝑘0 (𝑇 )
𝑃r = [M]
𝑘∞ (𝑇 )
(︂)︂
𝑛0 𝐸0
𝑘0 (𝑇 ) = 𝐴0 𝑇 exp −
𝑅𝑇
(︂ )︂
𝑛∞ 𝐸∞
𝑘∞ (𝑇 ) = 𝐴∞ 𝑇 exp −
𝑅𝑇
and [M] ≈ 𝑃/𝑅𝑇 is the concentration of the bath gas. The Arrhenius expressions 𝑘0 (𝑇 ) and 𝑘∞ (𝑇 ) represent
the low-pressure and high-pressure limit kinetics, respectively. The broadening factor 𝐹 is computed via
{︃ [︂ ]︂2 }︃−1
log 𝑃r + 𝑐
log 𝐹 = 1 + log 𝐹cent
𝑛 − 𝑑(log 𝑃r + 𝑐)
𝑐 = −0.4 − 0.67 log 𝐹cent
𝑛 = 0.75 − 1.27 log 𝐹cent
𝑑 = 0.14
𝐹cent = (1 − 𝛼) exp (−𝑇 /𝑇3 ) + 𝛼 exp (−𝑇 /𝑇1 ) + exp (−𝑇2 /𝑇 )

Pmax
The maximum pressure at which the model is valid, or None if not defined.
Pmin
The minimum pressure at which the model is valid, or None if not defined.
T1
The Troe 𝑇1 parameter.

1.5. Kinetics (rmgpy.kinetics) 95


RMG-Py API Reference, Release 2.4.1

T2
The Troe 𝑇2 parameter.
T3
The Troe 𝑇3 parameter.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
alpha
‘double’
Type alpha
arrheniusHigh
rmgpy.kinetics.arrhenius.Arrhenius
Type arrheniusHigh
arrheniusLow
rmgpy.kinetics.arrhenius.Arrhenius
Type arrheniusLow
changeRate(self, double factor)
Changes kinetics rate by a multiple factor.
comment
str
Type comment
discrepancy(self, KineticsModel otherKinetics) → double
Returns some measure of the discrepancy based on two different reaction models.
efficiencies
dict
Type efficiencies
getCanteraEfficiencies(self, speciesList)
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable
for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReac-
tion,‘ChemicallyActivatedReaction‘
getEffectiveColliderEfficiencies(self, list species) → ndarray
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps
assist rapid effective pressure calculations in the solver.
getEffectivePressure(self, double P, list species, ndarray fractions) → double
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of
species (Species or Molecule objects) with the given fractions.
getRateCoefficient(self, double T, double P=0.0) → double
Return the value of the rate coefficient 𝑘(𝑇 ) in units of m^3, mol, and s at the specified temperature
T in K and pressure P in Pa. If you wish to consider collision efficiencies, then you should first use
getEffectivePressure() to compute the effective pressure, and pass that value as the pressure to this
method.
highPlimit
rmgpy.kinetics.model.KineticsModel

96 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type highPlimit
isIdenticalTo(self, KineticsModel otherKinetics) → bool
Checks to see if kinetics matches that of other kinetics and returns True if coeffs, kunits, Tmin,
isPressureDependent(self ) → bool
Return True since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
isPressureValid(self, double P) → bool
Return True if the pressure P in Pa is within the valid pressure range of the kinetic data, or False if not.
If the minimum and maximum pressure are not defined, True is returned.
isSimilarTo(self, KineticsModel otherKinetics) → bool
Returns True if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5
for log(k), in other words, within a factor of 3.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the kinetic data, or False
if not. If the minimum and maximum temperature are not defined, True is returned.
setCanteraKinetics(self, ctReaction, speciesList)
Sets the efficiencies, kinetics, and troe falloff parameters for a cantera FalloffReaction.
toHTML(self )
Return an HTML rendering.

rmgpy.kinetics.Wigner

class rmgpy.kinetics.Wigner(frequency)
A tunneling model based on the Wigner formula. The attributes are:

Attribute Description
frequency The imaginary frequency of the transition state

An early formulation for incorporating the effect of tunneling is that of Wigner [1932Wigner]:
(︂ )︂2
1 ℎ |𝜈TS |
𝜅(𝑇 ) = 1 +
24 𝑘B 𝑇

where ℎ is the Planck constant, 𝜈TS is the negative frequency, 𝑘B is the Boltzmann constant, and 𝑇 is the
absolute temperature.
The Wigner formula represents the first correction term in a perturbative expansion for a parabolic barrier
[1959Bell], and is therefore only accurate in the limit of a small tunneling correction. There are many cases
for which the tunneling correction is very large; for these cases the Wigner model is inappropriate.
calculateTunnelingFactor(self, double T ) → double
Calculate and return the value of the Wigner tunneling correction for the reaction at the temperature T in
K.
calculateTunnelingFunction(self, ndarray Elist) → ndarray
Raises NotImplementedError, as the Wigner tunneling model does not have a well-defined energy-
dependent tunneling function.
frequency
The negative frequency along the reaction coordinate.

1.5. Kinetics (rmgpy.kinetics) 97


RMG-Py API Reference, Release 2.4.1

rmgpy.kinetics.Eckart

class rmgpy.kinetics.Eckart(frequency, E0_reac, E0_TS, E0_prod=None)


A tunneling model based on the Eckart model. The attributes are:

Attribute Description
frequency The imaginary frequency of the transition state
E0_reac The ground-state energy of the reactants
E0_TS The ground-state energy of the transition state
E0_prod The ground-state energy of the products

If E0_prod is not given, it is assumed to be the same as the reactants; this results in the so-called “symmetric”
Eckart model. Providing E0_prod, and thereby using the “asymmetric” Eckart model, is the recommended
approach.
The Eckart tunneling model is based around a potential of the form
[︃ ]︃
~2 𝐴𝑒𝑥 𝐵𝑒𝑥
𝑉 (𝑥) = + 2
2𝑚 1 + 𝑒𝑥 (1 + 𝑒𝑥 )

where 𝑥 represents the reaction coordinate and 𝐴 and 𝐵 are parameters. The potential is symmetric if 𝐴 = 0
and asymmetric if 𝐴 ̸= 0. If we add the constraint |𝐵| > |𝐴| then the potential has a maximum at
(︂ )︂
𝐵+𝐴
𝑥max = ln
𝐵−𝐴

~2 (𝐴 + 𝐵)2
𝑉 (𝑥max ) =
2𝑚 4𝐵
The one-dimensional Schrodinger equation with the Eckart potential is analytically solvable. The resulting
microcanonical tunneling factor 𝜅(𝐸) is a function of the total energy of the molecular system:

cosh(2𝜋𝑎 − 2𝜋𝑏) + cosh(2𝜋𝑑)


𝜅(𝐸) = 1 −
cosh(2𝜋𝑎 + 2𝜋𝑏) + cosh(2𝜋𝑑)

where

2 𝛼1 𝜉
2𝜋𝑎 = −1/2 −1/2
𝛼1 + 𝛼2
√︀
2 |(𝜉 − 1)𝛼1 + 𝛼2 |
2𝜋𝑏 = −1/2 −1/2
𝛼1 + 𝛼2
√︀
2𝜋𝑑 = 2 |𝛼1 𝛼2 − 4𝜋 2 /16|
∆𝑉1
𝛼1 = 2𝜋
ℎ |𝜈TS |
∆𝑉2
𝛼2 = 2𝜋
ℎ |𝜈TS |
𝐸
𝜉=
∆𝑉1
∆𝑉1 and ∆𝑉2 are the thermal energy difference between the transition state and the reactants and products,
respectively; 𝜈TS is the negative frequency, ℎ is the Planck constant.

98 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Applying a Laplace transform gives the canonical tunneling factor as a function of temperature 𝑇 (expressed as
𝛽 ≡ 1/𝑘B 𝑇 ):
∫︁ ∞
𝜅(𝑇 ) = 𝑒 𝛽Δ𝑉1
𝜅(𝐸)𝑒−𝛽𝐸 𝑑𝐸
0

If product data is not available, then it is assumed that 𝛼2 ≈ 𝛼1 .


The Eckart correction requires information about the reactants as well as the transition state. For best results,
information about the products should also be given. (The former is called the symmetric Eckart correction, the
latter the asymmetric Eckart correction.) This extra information allows the Eckart correction to generally give a
better result than the Wigner correction.
E0_TS
The ground-state energy of the transition state.
E0_prod
The ground-state energy of the products.
E0_reac
The ground-state energy of the reactants.
calculateTunnelingFactor(self, double T ) → double
Calculate and return the value of the Eckart tunneling correction for the reaction at the temperature T in K.
calculateTunnelingFunction(self, ndarray Elist) → ndarray
Calculate and return the value of the Eckart tunneling function for the reaction at the energies Elist in
J/mol.
frequency
The negative frequency along the reaction coordinate.

1.6 Molecular representations (rmgpy.molecule)

The rmgpy.molecule subpackage contains classes and functions for working with molecular representations, partic-
ularly using chemical graph theory.

1.6.1 Graphs

Class Description
Vertex A generic vertex (node) in a graph
Edge A generic edge (arc) in a graph
Graph A generic graph data type

1.6.2 Graph isomorphism

Class Description
VF2 Graph isomorphism using the VF2 algorithm

1.6. Molecular representations (rmgpy.molecule) 99


RMG-Py API Reference, Release 2.4.1

1.6.3 Elements and atom types

Class/Function Description
Element A model of a chemical element
getElement() Return the Element object for a given atomic number or symbol
AtomType A model of an atom type: an element and local bond structure
getAtomType() Return the AtomType object for a given atom in a molecule

1.6.4 Molecules

Class Description
Atom An atom in a molecule
Bond A bond in a molecule
Molecule A molecular structure represented using a chemical graph

1.6.5 Functional groups

Class Description
GroupAtom An atom in a functional group
GroupBond A bond in a functional group
Group A functional group structure represented using a chemical graph

1.6.6 Molecule Utilities

Class Description
rmgpy.molecule.resonance Resonance structure generation methods
rmgpy.molecule.kekulize Kekule structure generation
rmgpy.molecule.pathfinder Resonance path enumeration
rmgpy.molecule.converter Molecule object converter (RDKit/OpenBabel)
rmgpy.molecule.translator Molecule string representation translator

1.6.7 Adjacency lists

Function Description
fromAdjacencyList() Convert an adjacency list to a set of atoms and bonds
toAdjacencyList() Convert a set of atoms and bonds to an adjacency list

100 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.6.8 Symmetry numbers

Class Description
calculateAtomSymmetryNumber() Calculate the atom-centered symmetry number for an atom in a molecule
calculateBondSymmetryNumber() Calculate the bond-centered symmetry number for a bond in a molecule
calculateAxisSymmetryNumber() Calculate the axis-centered symmetry number for a double bond axis in a
molecule
calculateCyclicSymmetryNumber()
Calculate the ring-centered symmetry number for a ring in a molecule
calculateSymmetryNumber() Calculate the total internal + external symmetry number for a molecule

1.6.9 Molecule and reaction drawing

Class Description
MoleculeDrawer Draw the skeletal formula of a molecule
ReactionDrawer Draw a chemical reaction

rmgpy.molecule.graph.Vertex

class rmgpy.molecule.graph.Vertex
A base class for vertices in a graph. Contains several connectivity values useful for accelerating isomorphism
searches, as proposed by Morgan (1965).

Attribute Type Description


connectivity1 int The number of nearest neighbors
connectivity2 int The sum of the neighbors’ connectivity1 values
connectivity3 int The sum of the neighbors’ connectivity2 values
edges dict Dictionary of edges with keys being neighboring vertices
sortingLabel int An integer label used to sort the vertices

connectivity1
‘short’
Type connectivity1
connectivity2
‘short’
Type connectivity2
connectivity3
‘short’
Type connectivity3
copy(self ) → Vertex
Return a copy of the vertex. The default implementation assumes that no semantic information is associ-
ated with each vertex, and therefore simply returns a new Vertex object.
edges
dict
Type edges

1.6. Molecular representations (rmgpy.molecule) 101


RMG-Py API Reference, Release 2.4.1

equivalent(self, Vertex other, bool strict=True) → bool


Return True if two vertices self and other are semantically equivalent, or False if not. You should
reimplement this function in a derived class if your vertices have semantic information.
ignore
‘bool’
Type ignore
isSpecificCaseOf(self, Vertex other) → bool
Return True if self is semantically more specific than other, or False if not. You should reimplement
this function in a derived class if your edges have semantic information.
mapping
rmgpy.molecule.graph.Vertex
Type mapping
resetConnectivityValues(self )
Reset the cached structure information for this vertex.
sortingLabel
‘short’
Type sortingLabel
terminal
‘bool’
Type terminal

rmgpy.molecule.graph.Edge

class rmgpy.molecule.graph.Edge(vertex1, vertex2)


A base class for edges in a graph. The vertices which comprise the edge can be accessed using the vertex1 and
vertex2 attributes.
copy(self ) → Edge
Return a copy of the edge. The default implementation assumes that no semantic information is associated
with each edge, and therefore simply returns a new Edge object. Note that the vertices are not copied in
this implementation.
equivalent(self, Edge other) → bool
Return True if two edges self and other are semantically equivalent, or False if not. You should reim-
plement this function in a derived class if your edges have semantic information.
getOtherVertex(self, Vertex vertex) → Vertex
Given a vertex that makes up part of the edge, return the other vertex. Raise a ValueError if the given
vertex is not part of the edge.
isSpecificCaseOf(self, Edge other) → bool
Return True if self is semantically more specific than other, or False if not. You should reimplement
this function in a derived class if your edges have semantic information.
vertex1
rmgpy.molecule.graph.Vertex
Type vertex1
vertex2
rmgpy.molecule.graph.Vertex

102 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type vertex2

rmgpy.molecule.graph.Graph

class rmgpy.molecule.graph.Graph(vertices=None)
A graph data type. The vertices of the graph are stored in a list vertices; this provides a consistent traversal
order. A single edge can be accessed using the getEdge() method or by accessing specific vertices using
vertex1.edges[vertex2]; in either case, an exception will be raised if the edge does not exist. All edges of
a vertex can be accessed using the getEdges() method or vertex.edges.
addEdge(self, Edge edge) → Edge
Add an edge to the graph. The two vertices in the edge must already exist in the graph, or a ValueError
is raised.
addVertex(self, Vertex vertex) → Vertex
Add a vertex to the graph. The vertex is initialized with no edges.
copy(self, bool deep=False) → Graph
Create a copy of the current graph. If deep is True, a deep copy is made: copies of the vertices and edges
are used in the new graph. If deep is False or not specified, a shallow copy is made: the original vertices
and edges are used in the new graph.
copyAndMap(self ) → dict
Create a deep copy of the current graph, and return the dict ‘mapping’. Method was modified from
Graph.copy() method
findIsomorphism(self, Graph other, dict initialMap=None, bool saveOrder=False, bool strict=True)
→ list
Returns True if other is subgraph isomorphic and False otherwise, and the matching mapping. Uses the
VF2 algorithm of Vento and Foggia.
Parameters
• initialMap (dict, optional) – initial atom mapping to use
• saveOrder (bool, optional) – if True, reset atom order after performing atom iso-
morphism
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
findSubgraphIsomorphisms(self, Graph other, dict initialMap=None, bool saveOrder=False) → list
Returns True if other is subgraph isomorphic and False otherwise. Also returns the lists all of valid
mappings.
Uses the VF2 algorithm of Vento and Foggia.
getAllCycles(self, Vertex startingVertex) → list
Given a starting vertex, returns a list of all the cycles containing that vertex.
This function returns a duplicate of each cycle because [0,1,2,3] is counted as separate from [0,3,2,1]
getAllCyclesOfSize(self, int size) → list
Return a list of the all non-duplicate rings with length ‘size’. The algorithm implements was adapted from
a description by Fan, Panaye, Doucet, and Barbu (doi: 10.1021/ci00015a002)
B. T. Fan, A. Panaye, J. P. Doucet, and A. Barbu. “Ring Perception: A New Algorithm for Directly Finding
the Smallest Set of Smallest Rings from a Connection Table.” J. Chem. Inf. Comput. Sci. 33, p. 657-662
(1993).
getAllCyclicVertices(self ) → list
Returns all vertices belonging to one or more cycles.

1.6. Molecular representations (rmgpy.molecule) 103


RMG-Py API Reference, Release 2.4.1

getAllEdges(self ) → list
Returns a list of all edges in the graph.
getAllPolycyclicVertices(self ) → list
Return all vertices belonging to two or more cycles, fused or spirocyclic.
getAllSimpleCyclesOfSize(self, int size) → list
Return a list of all non-duplicate monocyclic rings with length ‘size’.
Naive approach by eliminating polycyclic rings that are returned by getAllCyclicsOfSize.
getDisparateRings(self ) → tuple
Get all disjoint monocyclic and polycyclic cycle clusters in the molecule. Takes the RC and recursively
merges all cycles which share vertices.
Returns: monocyclic_cycles, polycyclic_cycles
getEdge(self, Vertex vertex1, Vertex vertex2) → Edge
Returns the edge connecting vertices vertex1 and vertex2.
getEdges(self, Vertex vertex) → dict
Return a dictionary of the edges involving the specified vertex.
getLargestRing(self, Vertex vertex) → list
returns the largest ring containing vertex. This is typically useful for finding the longest path in a polycyclic
ring, since the polycyclic rings returned from getPolycyclicRings are not necessarily in order in the ring
structure.
getMaxCycleOverlap(self ) → int
Return the maximum number of vertices that are shared between any two cycles in the graph. For example,
if there are only disparate monocycles or no cycles, the maximum overlap is zero; if there are “spiro”
cycles, it is one; if there are “fused” cycles, it is two; and if there are “bridged” cycles, it is three.
getMonocyclicRings(self ) → list
Return a list of cycles that are monocyclic.
getPolycyclicRings(self ) → list
Return a list of cycles that are polycyclic. In other words, merge the cycles which are fused or spirocyclic
into a single polycyclic cycle, and return only those cycles. Cycles which are not polycyclic are not
returned.
getRelevantCycles(self ) → list
Returns the set of relevant cycles as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021
Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of
Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
getSmallestSetOfSmallestRings(self ) → list
Returns the smallest set of smallest rings as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021
Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of
Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
get_edges_in_cycle(self, list vertices, bool sort=False) → list
For a given list of atoms comprising a ring, return the set of bonds connecting them, in order around the
ring.

104 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

If sort=True, then sort the vertices to match their connectivity. Otherwise, assumes that they are already
sorted, which is true for cycles returned by getRelevantCycles or getSmallestSetOfSmallestRings.
hasEdge(self, Vertex vertex1, Vertex vertex2) → bool
Returns True if vertices vertex1 and vertex2 are connected by an edge, or False if not.
hasVertex(self, Vertex vertex) → bool
Returns True if vertex is a vertex in the graph, or False if not.
isCyclic(self ) → bool
Return True if one or more cycles are present in the graph or False otherwise.
isEdgeInCycle(self, Edge edge) → bool
Return True if the edge between vertices vertex1 and vertex2 is in one or more cycles in the graph, or
False if not.
isIsomorphic(self, Graph other, dict initialMap=None, bool saveOrder=False, bool strict=True) →
bool
Returns True if two graphs are isomorphic and False otherwise. Uses the VF2 algorithm of Vento and
Foggia.
Parameters
• initialMap (dict, optional) – initial atom mapping to use
• saveOrder (bool, optional) – if True, reset atom order after performing atom iso-
morphism
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isMappingValid(self, Graph other, dict mapping, bool equivalent=True, bool strict=True) → bool
Check that a proposed mapping of vertices from self to other is valid by checking that the vertices and
edges involved in the mapping are mutually equivalent. If equivalent is True it checks if atoms and edges
are equivalent, if False it checks if they are specific cases of each other. If strict is True, electrons and
bond orders are considered, and ignored if False.
isSubgraphIsomorphic(self, Graph other, dict initialMap=None, bool saveOrder=False) → bool
Returns True if other is subgraph isomorphic and False otherwise. Uses the VF2 algorithm of Vento and
Foggia.
isVertexInCycle(self, Vertex vertex) → bool
Return True if the given vertex is contained in one or more cycles in the graph, or False if not.
merge(self, Graph other) → Graph
Merge two graphs so as to store them in a single Graph object.
ordered_vertices
list
Type ordered_vertices
removeEdge(self, Edge edge)
Remove the specified edge from the graph. Does not remove vertices that no longer have any edges as a
result of this removal.
removeVertex(self, Vertex vertex)
Remove vertex and all edges associated with it from the graph. Does not remove vertices that no longer
have any edges as a result of this removal.
resetConnectivityValues(self )
Reset any cached connectivity information. Call this method when you have modified the graph.
restore_vertex_order(self )
reorder the vertices to what they were before sorting if you saved the order

1.6. Molecular representations (rmgpy.molecule) 105


RMG-Py API Reference, Release 2.4.1

sortVertices(self, bool saveOrder=False)


Sort the vertices in the graph. This can make certain operations, e.g. the isomorphism functions, much
more efficient.
split(self ) → list
Convert a single Graph object containing two or more unconnected graphs into separate graphs.
updateConnectivityValues(self )
Update the connectivity values for each vertex in the graph. These are used to accelerate the isomorphism
checking.
vertices
list
Type vertices

rmgpy.molecule.vf2.VF2

class rmgpy.molecule.vf2.VF2(graphA=None, graphB=None)


An implementation of the second version of the Vento-Foggia (VF2) algorithm for graph and subgraph isomor-
phism.
feasible(self, Vertex vertex1, Vertex vertex2) → bool
Return True if vertex vertex1 from the first graph is a feasible match for vertex vertex2 from the second
graph, or False if not. The semantic and structural relationship of the vertices is evaluated, including
several structural “look-aheads” that cheaply eliminate many otherwise feasible pairs.
findIsomorphism(self, Graph graph1, Graph graph2, dict initialMapping, bool saveOrder=False, bool
strict=True) → list
Return a list of dicts of all valid isomorphism mappings from graph graph1 to graph graph2 with the
optional initial mapping initialMapping. If no valid isomorphisms are found, an empty list is returned.
findSubgraphIsomorphisms(self, Graph graph1, Graph graph2, dict initialMapping, bool save-
Order=False) → list
Return a list of dicts of all valid subgraph isomorphism mappings from graph graph1 to subgraph graph2
with the optional initial mapping initialMapping. If no valid subgraph isomorphisms are found, an empty
list is returned.
isIsomorphic(self, Graph graph1, Graph graph2, dict initialMapping, bool saveOrder=False, bool
strict=True) → bool
Return True if graph graph1 is isomorphic to graph graph2 with the optional initial mapping initialMap-
ping, or False otherwise.
isSubgraphIsomorphic(self, Graph graph1, Graph graph2, dict initialMapping, bool save-
Order=False) → bool
Return True if graph graph1 is subgraph isomorphic to subgraph graph2 with the optional initial mapping
initialMapping, or False otherwise.

rmgpy.molecule.Element

class rmgpy.molecule.Element(number, symbol, name, mass, isotope=-1, chemkinName=None)


A chemical element. The attributes are:

106 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Type Description


number int The atomic number of the element
symbol str The symbol used for the element
name str The IUPAC name of the element
mass float The mass of the element in kg/mol
covRadius float Covalent bond radius in Angstrom
isotope int The isotope integer of the element
chemkinName str The chemkin compatible representation of the element

This class is specifically for properties that all atoms of the same element share. Ideally there is only one instance
of this class for each element.
chemkinName
str
Type chemkinName
covRadius
‘float’
Type covRadius
isotope
‘int’
Type isotope
mass
‘float’
Type mass
name
str
Type name
number
‘int’
Type number
symbol
str
Type symbol
rmgpy.molecule.getElement(value, int isotope=-1) → Element
Return the Element object corresponding to the given parameter value. If an integer is provided, the value is
treated as the atomic number. If a string is provided, the value is treated as the symbol. An ElementError is
raised if no matching element is found.

rmgpy.molecule.AtomType

class rmgpy.molecule.AtomType(label=”, generic=None, specific=None, single=None, allDou-


ble=None, rDouble=None, oDouble=None, sDouble=None,
triple=None, quadruple=None, benzene=None, lonePairs=None,
charge=None)
A class for internal representation of atom types. Using unique objects rather than strings allows us to use fast
pointer comparisons instead of slow string comparisons, as well as store extra metadata. In particular, we store

1.6. Molecular representations (rmgpy.molecule) 107


RMG-Py API Reference, Release 2.4.1

metadata describing the atom type’s hierarchy with regard to other atom types, and the atom types that can result
when various actions involving this atom type are taken. The attributes are:

Attribute Type Description


label str A unique label for the atom type
generic list The atom types that are more generic than this one
specific list The atom types that are more specific than this one
incrementBond list The atom type(s) that result when an adjacent
bond’s order is incremented
decrementBond list The atom type(s) that result when an adjacent
bond’s order is decremented
formBond list The atom type(s) that result when a new single bond
is formed to this atom type
breakBond list The atom type(s) that result when an existing single
bond to this atom type is broken
incrementRadical list The atom type(s) that result when the number of
radical electrons is incremented
decrementRadical list The atom type(s) that result when the number of
radical electrons is decremented
incrementLonePair list The atom type(s) that result when the number of
lone electron pairs is incremented
decrementLonePair list The atom type(s) that result when the number of
lone electron pairs is decremented
The following features are what are required in a given atomtype. Any int in the list is acceptable. An empty
list is a wildcard
‘single’ ‘’list’‘ The total number of single bonds on the atom
‘allDouble’ ‘’list’‘ The total number of double bonds on the atom
‘rDouble’ ‘’list’‘ The number of double bonds to any non-oxygen,
nonsulfur
‘oDouble’ ‘’list’‘ The number of double bonds to oxygen
‘sDouble’ ‘’list’‘ The number of double bonds to sulfur
‘triple’ ‘’list’‘ The total number of triple bonds on the atom
‘quadruple’ ‘’list’‘ The total number of quadruple bonds on the atom
‘benzene’ ‘’list’‘ The total number of benzene bonds on the atom
‘lonePairs’ ‘’list’‘ The number of lone pairs on the atom
‘charge’ ‘’list’‘ The partial charge of the atom

allDouble
list
Type allDouble
benzene
list
Type benzene
breakBond
list
Type breakBond
charge
list
Type charge

108 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

decrementBond
list
Type decrementBond
decrementLonePair
list
Type decrementLonePair
decrementRadical
list
Type decrementRadical
equivalent(self, AtomType other) → bool
Returns True if two atom types atomType1 and atomType2 are equivalent or False otherwise. This
function respects wildcards, e.g. R!H is equivalent to C.
formBond
list
Type formBond
generic
list
Type generic
getFeatures(self ) → list
Returns a list of the features that are checked to determine atomtype
incrementBond
list
Type incrementBond
incrementLonePair
list
Type incrementLonePair
incrementRadical
list
Type incrementRadical
isSpecificCaseOf(self, AtomType other) → bool
Returns True if atom type atomType1 is a specific case of atom type atomType2 or False otherwise.
label
str
Type label
lonePairs
list
Type lonePairs
oDouble
list
Type oDouble

1.6. Molecular representations (rmgpy.molecule) 109


RMG-Py API Reference, Release 2.4.1

quadruple
list
Type quadruple
rDouble
list
Type rDouble
sDouble
list
Type sDouble
setActions(self, incrementBond, decrementBond, formBond, breakBond, incrementRadical, decremen-
tRadical, incrementLonePair, decrementLonePair)
single
list
Type single
specific
list
Type specific
triple
list
Type triple
rmgpy.molecule.getAtomType(atom, dict bonds) → AtomType
Determine the appropriate atom type for an Atom object atom with local bond structure bonds, a dict containing
atom-bond pairs.
The atom type of an atom describes the atom itself and (often) something about the local bond structure around
that atom. This is a useful semantic tool for accelerating graph isomorphism queries, and a useful shorthand when
specifying molecular substructure patterns via an RMG-style adjacency list.
We define the following basic atom types:

Atom type Description


General atom types
R any atom with any local bond structure
R!H any non-hydrogen atom with any local bond structure
Hydrogen atom types
H hydrogen atom with up to one single bond
Carbon atom types
C carbon atom with any local bond structure
Ca carbon atom with two lone pairs and no bonds
Cs carbon atom with up to four single bonds
Csc charged carbon atom with up to three single bonds
Cd carbon atom with one double bond (not to O or S) and up to two single bon
Cdc charged carbon atom with one double bond and up to one single bond
CO carbon atom with one double bond to oxygen and up to two single bonds
CS carbon atom with one double bond to sulfur and up to two single bonds
Cdd carbon atom with two double bonds
Ct carbon atom with one triple bond and up to one single bond

110 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Table 2 – continued from previous page


Atom type Description
Cb carbon atom with up to two benzene bonds and up to one single bond
Cbf carbon atom with three benzene bonds
C2s carbon atom with one lone pair (valance 2) and up to two single bonds
C2sc charged carbon atom with one lone pair (valance 2) and up to three single b
C2d carbon atom with one lone pair (valance 2) and one double bond
C2dc charged carbon atom with one lone pair (valance 2), one double bond and u
C2tc charged carbon atom with one lone pair (valance 2), one triple bond
Nitrogen atom types
N nitrogen atom with any local bond structure
N0sc charged nitrogen atom with three lone pairs (valance 0) with up to one singl
N1s nitrogen atom with two lone pairs (valance 1) and up to one single bond
N1sc charged nitrogen atom with two lone pairs (valance 1) up to two single bond
N1dc charged nitrogen atom with two lone pairs (valance 1), one double bond
N3s nitrogen atom with one lone pair (valance 3) with up to three single bonds
N3d nitrogen atom with one lone pair (valance 3), one double bond and up to on
N3t nitrogen atom with one lone pair (valance 3) and one triple bond
N3b nitrogen atom with one lone pair (valance 3) and two benzene bonds
N5sc charged nitrogen atom with no lone pairs (valance 5) with up to four single
N5dc charged nitrogen atom with no lone pairs (valance 5), one double bond and
N5ddc charged nitrogen atom with with no lone pairs (valance 5) and two double b
N5dddc charged nitrogen atom with with no lone pairs (valance 5) and three double
N5tc charged nitrogen atom with with no lone pairs (valance 5), one triple bond a
N5b nitrogen atom with with no lone pairs (valance 5) and two benzene bonds (o
N5bd nitrogen atom with with no lone pairs (valance 5), two benzene bonds, and
Oxygen atom types
O oxygen atom with any local bond structure
Oa oxygen atom with three lone pairs and no bonds
O0sc charged oxygen with three lone pairs (valance 0) and up to one single bond
O0dc charged oxygen atom with three lone pairs (valance 0) and one double bond
O2s oxygen atom with two lone pairs (valance 2) and up to two single bonds
O2sc charged oxygen atom with two lone pairs (valance 2) and up to one single b
O2d oxygen atom with two lone pairs (valance 2) and one doubel bond
O4sc charged oxygen atom with one one pair (valance 4) and up to three single b
O4dc charged oxygen atom with one one pair (valance 4), one double bond and u
O4tc charged oxygen atom with one one pair (valance 4) and one triple bond
O4b oxygen atom with one one pair (valance 4) and and two benzene bonds
Silicon atom types
Si silicon atom with any local bond structure
Sis silicon atom with four single bonds
Sid silicon atom with one double bond (to carbon) and two single bonds
SiO silicon atom with one double bond (to oxygen) and two single bonds
Sidd silicon atom with two double bonds
Sit silicon atom with one triple bond and one single bond
Sib silicon atom with two benzene bonds and one single bond
Sibf silicon atom with three benzene bonds
Sulfur atom types
S sulfur atom with any local bond structure
Sa sulfur atom with three lone pairs and no bonds
S0sc charged sulfur atom with three lone pairs (valance 0) and up to one single b

1.6. Molecular representations (rmgpy.molecule) 111


RMG-Py API Reference, Release 2.4.1

Table 2 – continued from previous page


Atom type Description
S2s sulfur atom with two lone pairs (valance 2) and up to two single bonds
S2sc charged sulfur atom with two lone pairs (valance 2) and up to three single b
S2d sulfur atom with two lone pairs (valance 2) and one double bond
S2dc charged sulfur atom with two lone pairs (valance 2), one double bond and u
S2tc charged sulfur atom with two lone pairs (valance 2) and one triple bond
S4s sulfur atom with one lone pair (valance 4) and up to four single bonds
S4sc charged sulfur atom with one lone pair (valance 4) and up to five single bon
S4d sulfur atom with one lone pair (valance 4), one double bond and up to two s
S4dd sulfur atom with one lone pair (valance 4) and two double bonds
S4dc charged sulfur atom with one lone pair (valance 4), one to three double bon
S4b sulfur atom with one lone pair (valance 4) and two benzene bonds (one of th
S4t sulfur atom with one lone pair (valance 4), one triple bond and up to one sin
S4tdc charged sulfur atom with one lone pair (valance 4) one to two triple bonds,
S6s sulfur atom with no lone pairs (valance 6) and up to six single bonds
S6sc charged sulfur atom with no lone pairs (valance 6) and up to seven single bo
S6d sulfur atom with no lone pairs (valance 6), one double bond and up to four s
S6dd sulfur atom with no lone pairs (valance 6), two double bonds and up to two
S6ddd sulfur atom with no lone pairs (valance 6) and three double bonds
S6dc charged sulfur atom with no lone pairs (valance 6), one to three double bond
S6t sulfur atom with no lone pairs (valance 6), one triple bond and up to three s
S6td sulfur atom with no lone pairs (valance 6), one triple bond, one double bond
S6tt sulfur atom with no lone pairs (valance 6) and two triple bonds
S6tdc charged sulfur atom with no lone pairs (valance 6), one to two triple bonds,
Chlorine atom types
Cl chlorine atom with any local bond structure
Cl1s chlorine atom with three lone pairs and zero to one single bonds
Iodine atom types
I iodine atom with any local bond structure
I1s iodine atom with three lone pairs and zero to one single bonds
Fluorine atom types
F fluorine atom with any local bond structure
F1s fluorine atom with three lone pairs and zero to one single bonds

Reaction recipes

A reaction recipe is a procedure for applying a reaction to a set of chemical species. Each reaction recipe is made up
of a set of actions that, when applied sequentially, a set of chemical reactants to chemical products via that reaction’s
characteristic chemical process. Each action requires a small set of parameters in order to be fully defined.
We define the following reaction recipe actions:

112 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Action Arguments Action


name
CHANGE_BOND
center1, order, change the bond order of the bond between center1 and center2 by
center2 order; do not break or form bonds
FORM_BONDcenter1, order, form a new bond between center1 and center2 of type order
center2
BREAK_BONDcenter1, order, break the bond between center1 and center2, which should be of
center2 type order
GAIN_RADICAL
center, radical increase the number of free electrons on center by radical
LOSE_RADICAL
center, radical decrease the number of free electrons on center by radical

rmgpy.molecule.Atom

class rmgpy.molecule.Atom(element=None, radicalElectrons=0, charge=0, label=”, lonePairs=-100,


coords=numpy.array([]), id=-1, props=None)
An atom. The attributes are:

Attribute Type Description


atomType AtomType The atom type
element Element The chemical element the atom represents
radicalElectrons short The number of radical electrons
charge short The formal charge of the atom
label str A string label that can be used to tag individual atoms
coords numpy array The (x,y,z) coordinates in Angstrom
lonePairs short The number of lone electron pairs
id int Number assignment for atom tracking purposes
bonds dict Dictionary of bond objects with keys being neighboring atoms
props dict Dictionary for storing additional atom properties
mass int atomic mass of element (read only)
number int atomic number of element (read only)
symbol str atomic symbol of element (read only)

Additionally, the mass, number, and symbol attributes of the atom’s element can be read (but not written)
directly from the atom object, e.g. atom.symbol instead of atom.element.symbol.
applyAction(self, action)
Update the atom pattern as a result of applying action, a tuple containing the name of the reaction recipe
action along with any required parameters. The available actions can be found here.
atomType
rmgpy.molecule.atomtype.AtomType
Type atomType
charge
‘short’
Type charge
connectivity1
‘short’
Type connectivity1

1.6. Molecular representations (rmgpy.molecule) 113


RMG-Py API Reference, Release 2.4.1

connectivity2
‘short’
Type connectivity2
connectivity3
‘short’
Type connectivity3
coords
numpy.ndarray
Type coords
copy(self ) → Vertex
Generate a deep copy of the current atom. Modifying the attributes of the copy will not affect the original.
decrementLonePairs(self )
Update the lone electron pairs pattern as a result of applying a LOSE_PAIR action.
decrementRadical(self )
Update the atom pattern as a result of applying a LOSE_RADICAL action, where radical specifies the
number of radical electrons to remove.
edges
dict
Type edges
element
rmgpy.molecule.element.Element
Type element
equivalent(self, Vertex other, bool strict=True) → bool
Return True if other is indistinguishable from this atom, or False otherwise. If other is an Atom object,
then all attributes except label and ‘ID’ must match exactly. If other is an GroupAtom object, then the
atom must match any of the combinations in the atom pattern. If strict is False, then only the element
is compared and electrons are ignored.
getBondOrdersForAtom(self )
This helper function is to help calculate total bond orders for an input atom.
Some special consideration for the order B bond. For atoms having three B bonds, the order for each is
4/3.0, while for atoms having other than three B bonds, the order for each is 3/2.0
get_descriptor(self )
Return a tuple used for sorting atoms. Currently uses atomic number, connectivity value, radical electrons,
lone pairs, and charge
id
‘int’
Type id
ignore
‘bool’
Type ignore
incrementLonePairs(self )
Update the lone electron pairs pattern as a result of applying a GAIN_PAIR action.

114 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

incrementRadical(self )
Update the atom pattern as a result of applying a GAIN_RADICAL action, where radical specifies the
number of radical electrons to add.
isCarbon(self ) → bool
Return True if the atom represents a carbon atom or False if not.
isChlorine(self ) → bool
Return True if the atom represents a chlorine atom or False if not.
isFluorine(self ) → bool
Return True if the atom represents a fluorine atom or False if not.
isHydrogen(self ) → bool
Return True if the atom represents a hydrogen atom or False if not.
isIodine(self ) → bool
Return True if the atom represents an iodine atom or False if not.
isNOS(self ) → bool
Return True if the atom represent either nitrogen, sulfur, or oxygen False if it does not.
isNitrogen(self )
Return True if the atom represents a nitrogen atom or False if not.
isNonHydrogen(self ) → bool
Return True if the atom does not represent a hydrogen atom or False if it does.
isOxygen(self ) → bool
Return True if the atom represents an oxygen atom or False if not.
isSilicon(self ) → bool
Return True if the atom represents a silicon atom or False if not.
isSpecificCaseOf(self, Vertex other) → bool
Return True if self is a specific case of other, or False otherwise. If other is an Atom object, then this is
the same as the equivalent() method. If other is an GroupAtom object, then the atom must match or
be more specific than any of the combinations in the atom pattern.
isSulfur(self ) → bool
Return True if the atom represents a sulfur atom or False if not.
isSurfaceSite(self ) → bool
Return True if the atom represents a surface site or False if not.
label
str
Type label
lonePairs
‘short’
Type lonePairs
mapping
rmgpy.molecule.graph.Vertex
Type mapping
props
dict
Type props

1.6. Molecular representations (rmgpy.molecule) 115


RMG-Py API Reference, Release 2.4.1

radicalElectrons
‘short’
Type radicalElectrons
resetConnectivityValues(self )
Reset the cached structure information for this vertex.
setLonePairs(self, int lonePairs)
Set the number of lone electron pairs.
sortingLabel
‘short’
Type sortingLabel
terminal
‘bool’
Type terminal
updateCharge(self )
Update self.charge, according to the valence, and the number and types of bonds, radicals, and lone pairs.

rmgpy.molecule.Bond

class rmgpy.molecule.Bond(atom1, atom2, order=1)


A chemical bond. The attributes are:

Attribute Type Description


order float The bond type
atom1 Atom An Atom object connecting to the bond
atom2 Atom An Atom object connecting to the bond

applyAction(self, action)
Update the bond as a result of applying action, a tuple containing the name of the reaction recipe action
along with any required parameters. The available actions can be found here.
copy(self ) → Edge
Generate a deep copy of the current bond. Modifying the attributes of the copy will not affect the original.
decrementOrder(self )
Update the bond as a result of applying a CHANGE_BOND action to decrease the order by one.
equivalent(self, Edge other) → bool
Return True if other is indistinguishable from this bond, or False otherwise. other can be either a Bond
or a GroupBond object.
getBDE(self )
estimate the bond dissociation energy in J/mol of the bond based on the order of the bond and the atoms
involved in the bond
getOrderNum(self ) → float
returns the bond order as a number
getOrderStr(self ) → str
returns a string representing the bond order

116 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getOtherVertex(self, Vertex vertex) → Vertex


Given a vertex that makes up part of the edge, return the other vertex. Raise a ValueError if the given
vertex is not part of the edge.
get_bond_string(self ) → str
Represent the bond object as a string (eg. ‘C#N’). The returned string is independent of the atom ordering,
with the atom labels in alphabetical order (i.e. ‘C-H’ is possible but not ‘H-C’) :return: str
incrementOrder(self )
Update the bond as a result of applying a CHANGE_BOND action to increase the order by one.
isBenzene(self ) → bool
Return True if the bond represents a benzene bond or False if not.
isDouble(self ) → bool
Return True if the bond represents a double bond or False if not.
isHydrogenBond(self )
Return True if the bond represents a hydrogen bond or False if not.
isOrder(self, float otherOrder) → bool
Return True if the bond is of order otherOrder or False if not. This compares floats that takes into
account floating point error
NOTE: we can replace the absolute value relation with math.isclose when we swtich to python 3.5+
isQuadruple(self ) → bool
Return True if the bond represents a quadruple bond or False if not.
isSingle(self ) → bool
Return True if the bond represents a single bond or False if not.
isSpecificCaseOf(self, Edge other) → bool
Return True if self is a specific case of other, or False otherwise. other can be either a Bond or a
GroupBond object.
isTriple(self ) → bool
Return True if the bond represents a triple bond or False if not.
isVanDerWaals(self ) → bool
Return True if the bond represents a van der Waals bond or False if not.
order
‘float’
Type order
setOrderNum(self, float newOrder)
change the bond order with a number
setOrderStr(self, str newOrder)
set the bond order using a valid bond-order character
vertex1
rmgpy.molecule.graph.Vertex
Type vertex1
vertex2
rmgpy.molecule.graph.Vertex
Type vertex2

1.6. Molecular representations (rmgpy.molecule) 117


RMG-Py API Reference, Release 2.4.1

Bond types

The bond type simply indicates the order of a chemical bond. We define the following bond types:

Bond type Description


S a single bond
D a double bond
T a triple bond
B a benzene bond

rmgpy.molecule.Molecule

class rmgpy.molecule.Molecule(atoms=None, symmetry=-1, multiplicity=-187, reactive=True,


props=None, InChI=”, SMILES=”)
A representation of a molecular structure using a graph data type, extending the Graph class. Attributes are:

Attribute Type Description


atoms list A list of Atom objects in the
molecule
symmetryNumber float The (estimated) external + in-
ternal symmetry number of the
molecule, modified for chirality
multiplicity int The multiplicity of this species,
multiplicity = 2*total_spin+1
reactive bool
True (by default) if the molecule participates in rea
It is set to False by the
filtration functions if a non
representative resonance
structure was generated by a
template reaction

props dict A list of properties describing the


state of the molecule.
InChI str A string representation of the
molecule in InChI
SMILES str A string representation of the
molecule in SMILES
fingerprint str A representation for fast compari-
son, set as molecular formula

A new molecule object can be easily instantiated by passing the SMILES or InChI string representing the molec-
ular structure.
InChI
InChI string for this molecule. Read-only.
SMILES
SMILES string for this molecule. Read-only.
addAtom(self, Atom atom)
Add an atom to the graph. The atom is initialized with no bonds.

118 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

addBond(self, Bond bond )


Add a bond to the graph as an edge connecting the two atoms atom1 and atom2.
addEdge(self, Edge edge) → Edge
Add an edge to the graph. The two vertices in the edge must already exist in the graph, or a ValueError
is raised.
addVertex(self, Vertex vertex) → Vertex
Add a vertex to the graph. The vertex is initialized with no edges.
assignAtomIDs(self )
Assigns an index to every atom in the molecule for tracking purposes. Uses entire range of cython’s integer
values to reduce chance of duplicates
atomIDValid(self ) → bool
Checks to see if the atom IDs are valid in this structure
atoms
List of atoms contained in the current molecule.
Renames the inherited vertices attribute of Graph.
calculateCp0(self ) → double
Return the value of the heat capacity at zero temperature in J/mol*K.
calculateCpInf(self ) → double
Return the value of the heat capacity at infinite temperature in J/mol*K.
calculateSymmetryNumber(self ) → float
Return the symmetry number for the structure. The symmetry number includes both external and internal
modes.
clearLabeledAtoms(self )
Remove the labels from all atoms in the molecule.
connectTheDots(self )
Delete all bonds, and set them again based on the Atoms’ coords. Does not detect bond type.
containsLabeledAtom(self, str label) → bool
Return True if the molecule contains an atom with the label label and False otherwise.
containsSurfaceSite(self ) → bool
Returns True iff the molecule contains an ‘X’ surface site.
copy(self, bool deep=False) → Graph
Create a copy of the current graph. If deep is True, a deep copy is made: copies of the vertices and edges
are used in the new graph. If deep is False or not specified, a shallow copy is made: the original vertices
and edges are used in the new graph.
copyAndMap(self ) → dict
Create a deep copy of the current graph, and return the dict ‘mapping’. Method was modified from
Graph.copy() method
countInternalRotors(self ) → int
Determine the number of internal rotors in the structure. Any single bond not in a cycle and between two
atoms that also have other bonds are considered to be internal rotors.
deleteHydrogens(self )
Irreversibly delete all non-labeled hydrogens without updating connectivity values. If there’s nothing but
hydrogens, it does nothing. It destroys information; be careful with it.
draw(self, str path)
Generate a pictorial representation of the chemical graph using the draw module. Use path to specify

1.6. Molecular representations (rmgpy.molecule) 119


RMG-Py API Reference, Release 2.4.1

the file to save the generated image to; the image type is automatically determined by extension. Valid
extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
enumerate_bonds(self ) → dict
Count the number of each type of bond (e.g. ‘C-H’, ‘C=C’) present in the molecule :return: dictionary,
with bond strings as keys and counts as values
findIsomorphism(self, Graph other, dict initialMap=None, bool saveOrder=False, bool strict=True)
→ list
Returns True if other is isomorphic and False otherwise, and the matching mapping. The initialMap
attribute can be used to specify a required mapping from self to other (i.e. the atoms of self are the keys,
while the atoms of other are the values). The returned mapping also uses the atoms of self for the keys
and the atoms of other for the values. The other parameter must be a Molecule object, or a TypeError
is raised.
Parameters
• initialMap (dict, optional) – initial atom mapping to use
• saveOrder (bool, optional) – if True, reset atom order after performing atom iso-
morphism
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
findSubgraphIsomorphisms(self, Graph other, dict initialMap=None, bool saveOrder=False) → list
Returns True if other is subgraph isomorphic and False otherwise. Also returns the lists all of valid
mappings. The initialMap attribute can be used to specify a required mapping from self to other (i.e. the
atoms of self are the keys, while the atoms of other are the values). The returned mappings also use the
atoms of self for the keys and the atoms of other for the values. The other parameter must be a Group
object, or a TypeError is raised.
find_H_bonds(self )
generates a list of (new-existing H bonds ignored) possible Hbond coordinates [(i1,j1),(i2,j2),. . . ] where i
and j values correspond to the indexes of the atoms involved, Hbonds are allowed if they meet the following
constraints:
1) between a H and [O,N] atoms
2) the hydrogen is covalently bonded to an O or N
3) the Hydrogen bond must complete a ring with at least 5 members
4) An atom can only be hydrogen bonded to one other atom
fingerprint
Fingerprint used to accelerate graph isomorphism comparisons with other molecules. The fingerprint is
a short string containing a summary of selected information about the molecule. Two fingerprint strings
matching is a necessary (but not sufficient) condition for the associated molecules to be isomorphic.
Currently, the fingerprint is simply the chemical formula.
fromAdjacencyList(self, str adjlist, bool saturateH=False)
Convert a string adjacency list adjlist to a molecular structure. Skips the first line (assuming it’s a label)
unless withLabel is False.
fromAugmentedInChI(self, aug_inchi)
Convert an Augmented InChI string aug_inchi to a molecular structure.
fromInChI(self, str inchistr, backend=’try-all’)
Convert an InChI string inchistr to a molecular structure.

120 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

fromSMARTS(self, smartsstr)
Convert a SMARTS string smartsstr to a molecular structure. Uses RDKit to perform the conversion. This
Kekulizes everything, removing all aromatic atom types.
fromSMILES(self, str smilesstr, backend=’try-all’)
Convert a SMILES string smilesstr to a molecular structure.
fromXYZ(self, ndarray atomicNums, ndarray coordinates)
Create an RMG molecule from a list of coordinates and a corresponding list of atomic numbers. These
are typically received from CCLib and the molecule is sent to ConnectTheDots so will only contain single
bonds.
generate_H_bonded_structures(self )
generates a list of Hbonded molecular structures in addition to the constraints on Hydrogen bonds applied
in the find_H_Bonds function the generated structures are constrained to:
1) An atom can only be hydrogen bonded to one other atom
2) Only two H-bonds can exist in a given molecule
the second is done to avoid explosive growth in the number of structures as without this constraint the
number of possible structures grows 2^n where n is the number of possible H-bonds
generate_resonance_structures(self, bool keep_isomorphic=False, bool filter_structures=True)
→ list
Returns a list of resonance structures of the molecule.
getAllCycles(self, Vertex startingVertex) → list
Given a starting vertex, returns a list of all the cycles containing that vertex.
This function returns a duplicate of each cycle because [0,1,2,3] is counted as separate from [0,3,2,1]
getAllCyclesOfSize(self, int size) → list
Return a list of the all non-duplicate rings with length ‘size’. The algorithm implements was adapted from
a description by Fan, Panaye, Doucet, and Barbu (doi: 10.1021/ci00015a002)
B. T. Fan, A. Panaye, J. P. Doucet, and A. Barbu. “Ring Perception: A New Algorithm for Directly Finding
the Smallest Set of Smallest Rings from a Connection Table.” J. Chem. Inf. Comput. Sci. 33, p. 657-662
(1993).
getAllCyclicVertices(self ) → list
Returns all vertices belonging to one or more cycles.
getAllEdges(self ) → list
Returns a list of all edges in the graph.
getAllPolycyclicVertices(self ) → list
Return all vertices belonging to two or more cycles, fused or spirocyclic.
getAllSimpleCyclesOfSize(self, int size) → list
Return a list of all non-duplicate monocyclic rings with length ‘size’.
Naive approach by eliminating polycyclic rings that are returned by getAllCyclicsOfSize.
getAromaticRings(self, list rings=None) → tuple
Returns all aromatic rings as a list of atoms and a list of bonds.
Identifies rings using Graph.getSmallestSetOfSmallestRings(), then uses RDKit to perceive aromaticity.
RDKit uses an atom-based pi-electron counting algorithm to check aromaticity based on Huckel’s Rule.
Therefore, this method identifies “true” aromaticity, rather than simply the RMG bond type.
The method currently restricts aromaticity to six-membered carbon-only rings. This is a limitation imposed
by RMG, and not by RDKit.

1.6. Molecular representations (rmgpy.molecule) 121


RMG-Py API Reference, Release 2.4.1

getBond(self, Atom atom1, Atom atom2) → Bond


Returns the bond connecting atoms atom1 and atom2.
getBonds(self, Atom atom) → dict
Return a dictionary of the bonds involving the specified atom.
getChargeSpan(self )
Iterate through the atoms in the structure and calculate the charge span on the overall molecule. The charge
span is a measure of the number of charge separations in a molecule.
getDeterministicSmallestSetOfSmallestRings(self ) → list
Modified Graph method getSmallestSetOfSmallestRings by sorting calculated cycles by short lenth and
then high atomic number instead of just short length (for cases where multiple cycles with same length are
found, getSmallestSetOfSmallestRings outputs non-determinstically ).
For instance, molecule with this SMILES: C1CC2C3CSC(CO3)C2C1, will have non-deterministic output
from getSmallestSetOfSmallestRings, which leads to non-deterministic bycyclic decomposition Using this
new method can effectively prevent this situation.
Important Note: This method returns an incorrect set of SSSR in certain molecules (such as cubane).
It is recommended to use the main Graph.getSmallestSetOfSmallestRings method in new applications.
Alternatively, consider using Graph.getRelevantCycles for deterministic output.
In future development, this method should ideally be replaced by some method to select a deterministic
set of SSSR from the set of Relevant Cycles, as that would be a more robust solution.
getDisparateRings(self ) → tuple
Get all disjoint monocyclic and polycyclic cycle clusters in the molecule. Takes the RC and recursively
merges all cycles which share vertices.
Returns: monocyclic_cycles, polycyclic_cycles
getEdge(self, Vertex vertex1, Vertex vertex2) → Edge
Returns the edge connecting vertices vertex1 and vertex2.
getEdges(self, Vertex vertex) → dict
Return a dictionary of the edges involving the specified vertex.
getFormula(self ) → str
Return the molecular formula for the molecule.
getLabeledAtom(self, str label) → Atom
Return the atoms in the molecule that are labeled.
getLabeledAtoms(self ) → dict
Return the labeled atoms as a dict with the keys being the labels and the values the atoms themselves. If
two or more atoms have the same label, the value is converted to a list of these atoms.
getLargestRing(self, Vertex vertex) → list
returns the largest ring containing vertex. This is typically useful for finding the longest path in a polycyclic
ring, since the polycyclic rings returned from getPolycyclicRings are not necessarily in order in the ring
structure.
getMaxCycleOverlap(self ) → int
Return the maximum number of vertices that are shared between any two cycles in the graph. For example,
if there are only disparate monocycles or no cycles, the maximum overlap is zero; if there are “spiro”
cycles, it is one; if there are “fused” cycles, it is two; and if there are “bridged” cycles, it is three.
getMolecularWeight(self ) → double
Return the molecular weight of the molecule in kg/mol.

122 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getMonocyclicRings(self ) → list
Return a list of cycles that are monocyclic.
getNetCharge(self )
Iterate through the atoms in the structure and calculate the net charge on the overall molecule.
getNthNeighbor(self, startingAtoms, distanceList, ignoreList=None, n=1)
Recursively get the Nth nonHydrogen neighbors of the startingAtoms, and return them in a list. startin-
gAtoms is a list of :class:Atom for which we will get the nth neighbor. distanceList is a list of intergers,
corresponding to the desired neighbor distances. ignoreList is a list of :class:Atom that have been counted
in (n-1)th neighbor, and will not be returned. n is an interger, corresponding to the distance to be calculated
in the current iteration.
getNumAtoms(self, str element=None) → int
Return the number of atoms in molecule. If element is given, ie. “H” or “C”, the number of atoms of that
element is returned.
getPolycyclicRings(self ) → list
Return a list of cycles that are polycyclic. In other words, merge the cycles which are fused or spirocyclic
into a single polycyclic cycle, and return only those cycles. Cycles which are not polycyclic are not
returned.
getRadicalAtoms(self )
Return the atoms in the molecule that have unpaired electrons.
getRadicalCount(self ) → short
Return the total number of radical electrons on all atoms in the molecule. In this function, monoradical
atoms count as one, biradicals count as two, etc.
getRelevantCycles(self ) → list
Returns the set of relevant cycles as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021
Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of
Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
getSingletCarbeneCount(self ) → short
Return the total number of singlet carbenes (lone pair on a carbon atom) in the molecule. Counts the
number of carbon atoms with a lone pair. In the case of [C] with two lone pairs, this method will return 1.
getSmallestSetOfSmallestRings(self ) → list
Returns the smallest set of smallest rings as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021
Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of
Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
getSymmetryNumber(self )
Returns the symmetry number of Molecule. First checks whether the value is stored as an attribute of
Molecule. If not, it calls the calculateSymmetryNumber method.
getURL(self )
Get a URL to the molecule’s info page on the RMG website.
get_edges_in_cycle(self, list vertices, bool sort=False) → list
For a given list of atoms comprising a ring, return the set of bonds connecting them, in order around the
ring.

1.6. Molecular representations (rmgpy.molecule) 123


RMG-Py API Reference, Release 2.4.1

If sort=True, then sort the vertices to match their connectivity. Otherwise, assumes that they are already
sorted, which is true for cycles returned by getRelevantCycles or getSmallestSetOfSmallestRings.
get_element_count(self ) → dict
Returns the element count for the molecule as a dictionary.
hasAtom(self, Atom atom) → bool
Returns True if atom is an atom in the graph, or False if not.
hasBond(self, Atom atom1, Atom atom2) → bool
Returns True if atoms atom1 and atom2 are connected by an bond, or False if not.
hasEdge(self, Vertex vertex1, Vertex vertex2) → bool
Returns True if vertices vertex1 and vertex2 are connected by an edge, or False if not.
hasVertex(self, Vertex vertex) → bool
Returns True if vertex is a vertex in the graph, or False if not.
has_lone_pairs(self ) → bool
Return True if the molecule contains at least one lone electron pair, or False otherwise.
identifyRingMembership(self )
Performs ring perception and saves ring membership information to the Atom.props attribute.
implicitHydrogens
‘bool’
Type implicitHydrogens
isAromatic(self )
Returns True if the molecule is aromatic, or False if not. Iterates over the SSSR’s and searches for
rings that consist solely of Cb atoms. Assumes that aromatic rings always consist of 6 atoms. In cases of
naphthalene, where a 6 + 4 aromatic system exists, there will be at least one 6 membered aromatic ring so
this algorithm will not fail for fused aromatic rings.
isArylRadical(self, list aromaticRings=None) → bool
Return True if the molecule only contains aryl radicals, ie. radical on an aromatic ring, or False other-
wise.
isAtomInCycle(self, Atom atom) → bool
Return True if atom is in one or more cycles in the structure, and False if not.
isBondInCycle(self, Bond bond ) → bool
Return True if the bond between atoms atom1 and atom2 is in one or more cycles in the graph, or False
if not.
isCyclic(self ) → bool
Return True if one or more cycles are present in the graph or False otherwise.
isEdgeInCycle(self, Edge edge) → bool
Return True if the edge between vertices vertex1 and vertex2 is in one or more cycles in the graph, or
False if not.

isIdentical(self, Molecule other, bool strict=True) → bool


Performs isomorphism checking, with the added constraint that atom IDs must match.
Primary use case is tracking atoms in reactions for reaction degeneracy determination.
Returns True if two graphs are identical and False otherwise.
If strict=False, performs the check ignoring electrons and resonance structures.

124 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

isIsomorphic(self, Graph other, dict initialMap=None, bool generateInitialMap=False, bool save-


Order=False, bool strict=True) → bool
Returns True if two graphs are isomorphic and False otherwise. The initialMap attribute can be used to
specify a required mapping from self to other (i.e. the atoms of self are the keys, while the atoms of other
are the values). The other parameter must be a Molecule object, or a TypeError is raised. Also ensures
multiplicities are also equal.
Parameters
• initialMap (dict, optional) – initial atom mapping to use
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• saveOrder (bool, optional) – if True, reset atom order after performing atom iso-
morphism
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isLinear(self ) → bool
Return True if the structure is linear and False otherwise.
isMappingValid(self, Graph other, dict mapping, bool equivalent=True, bool strict=True) → bool
Check that a proposed mapping of vertices from self to other is valid by checking that the vertices and
edges involved in the mapping are mutually equivalent. If equivalent is True it checks if atoms and edges
are equivalent, if False it checks if they are specific cases of each other. If strict is True, electrons and
bond orders are considered, and ignored if False.
isRadical(self ) → bool
Return True if the molecule contains at least one radical electron, or False otherwise.
isSubgraphIsomorphic(self, Graph other, dict initialMap=None, bool generateInitialMap=False,
bool saveOrder=False) → bool
Returns True if other is subgraph isomorphic and False otherwise. The initialMap attribute can be used
to specify a required mapping from self to other (i.e. the atoms of self are the keys, while the atoms of
other are the values). The other parameter must be a Group object, or a TypeError is raised.
isSurfaceSite(self ) → bool
Returns True iff the molecule is nothing but a surface site ‘X’.
isVertexInCycle(self, Vertex vertex) → bool
Return True if the given vertex is contained in one or more cycles in the graph, or False if not.
is_equal(self, other)
Method to test equality of two Molecule objects.
kekulize(self )
Kekulizes an aromatic molecule.
merge(self, Graph other) → Graph
Merge two molecules so as to store them in a single Molecule object. The merged Molecule object is
returned.
multiplicity
‘int’
Type multiplicity
ordered_vertices
list
Type ordered_vertices

1.6. Molecular representations (rmgpy.molecule) 125


RMG-Py API Reference, Release 2.4.1

props
dict
Type props
rdMol
object
Type rdMol
rdMolConfId
‘int’
Type rdMolConfId
reactive
‘bool’
Type reactive
removeAtom(self, Atom atom)
Remove atom and all bonds associated with it from the graph. Does not remove atoms that no longer have
any bonds as a result of this removal.
removeBond(self, Bond bond )
Remove the bond between atoms atom1 and atom2 from the graph. Does not remove atoms that no longer
have any bonds as a result of this removal.
removeEdge(self, Edge edge)
Remove the specified edge from the graph. Does not remove vertices that no longer have any edges as a
result of this removal.
removeVanDerWaalsBonds(self )
Remove all van der Waals bonds.
removeVertex(self, Vertex vertex)
Remove vertex and all edges associated with it from the graph. Does not remove vertices that no longer
have any edges as a result of this removal.
remove_H_bonds(self )
removes any present hydrogen bonds from the molecule
resetConnectivityValues(self )
Reset any cached connectivity information. Call this method when you have modified the graph.
restore_vertex_order(self )
reorder the vertices to what they were before sorting if you saved the order
saturate_radicals(self )
Saturate the molecule by replacing all radicals with bonds to hydrogen atoms. Changes self molecule
object.
saturate_unfilled_valence(self, update=True)
Saturate the molecule by adding H atoms to any unfilled valence
sortAtoms(self )
Sort the atoms in the graph. This can make certain operations, e.g. the isomorphism functions, much more
efficient.
This function orders atoms using several attributes in atom.getDescriptor(). Currently it sorts by placing
heaviest atoms first and hydrogen atoms last. Placing hydrogens last during sorting ensures that functions
with hydrogen removal work properly.

126 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

sortVertices(self, bool saveOrder=False)


Sort the vertices in the graph. This can make certain operations, e.g. the isomorphism functions, much
more efficient.
split(self ) → list
Convert a single Molecule object containing two or more unconnected molecules into separate
class:Molecule objects.
symmetryNumber
‘float’
Type symmetryNumber
toAdjacencyList(self, str label=”, bool removeH=False, bool removeLonePairs=False, bool old-
Style=False)
Convert the molecular structure to a string adjacency list.
toAugmentedInChI(self ) → str
Adds an extra layer to the InChI denoting the multiplicity of the molecule.
Separate layer with a forward slash character.
toAugmentedInChIKey(self ) → str
Adds an extra layer to the InChIKey denoting the multiplicity of the molecule.
Simply append the multiplicity string, do not separate by a character like forward slash.
toGroup(self )
This method converts a list of atoms in a Molecule to a Group object.
toInChI(self ) → str
Convert a molecular structure to an InChI string. Uses RDKit to perform the conversion. Perceives aro-
maticity.
or
Convert a molecular structure to an InChI string. Uses OpenBabel to perform the conversion.
toInChIKey(self ) → str
Convert a molecular structure to an InChI Key string. Uses OpenBabel to perform the conversion.
or
Convert a molecular structure to an InChI Key string. Uses RDKit to perform the conversion.
toRDKitMol(self, *args, **kwargs)
Convert a molecular structure to a RDKit rdmol object.
toSMARTS(self )
Convert a molecular structure to an SMARTS string. Uses RDKit to perform the conversion. Perceives
aromaticity and removes Hydrogen atoms.
toSMILES(self ) → str
Convert a molecular structure to an SMILES string.
If there is a Nitrogen atom present it uses OpenBabel to perform the conversion, and the SMILES may or
may not be canonical.
Otherwise, it uses RDKit to perform the conversion, so it will be canonical SMILES. While converting to
an RDMolecule it will perceive aromaticity and removes Hydrogen atoms.
toSingleBonds(self )
Returns a copy of the current molecule, consisting of only single bonds.

1.6. Molecular representations (rmgpy.molecule) 127


RMG-Py API Reference, Release 2.4.1

This is useful for isomorphism comparison against something that was made via fromXYZ, which does
not attempt to perceive bond orders
update(self, log_species=True)
Update connectivity values, atom types of atoms. Update multiplicity, and sort atoms using the new
connectivity values.
updateAtomTypes(self, bool logSpecies=True, bool raiseException=True)
Iterate through the atoms in the structure, checking their atom types to ensure they are correct (i.e. accu-
rately describe their local bond environment) and complete (i.e. are as detailed as possible).
If raiseException is False, then the generic atomType ‘R’ will be prescribed to any atom when getAtom-
Type fails. Currently used for resonance hybrid atom types.
updateConnectivityValues(self )
Update the connectivity values for each vertex in the graph. These are used to accelerate the isomorphism
checking.
updateLonePairs(self )
Iterate through the atoms in the structure and calculate the number of lone electron pairs, assuming a
neutral molecule.
updateMultiplicity(self )
Update the multiplicity of a newly formed molecule.
vertices
list
Type vertices

rmgpy.molecule.GroupAtom

class rmgpy.molecule.GroupAtom(atomType=None, radicalElectrons=None, charge=None, label=”,


lonePairs=None, props=None)
An atom group. This class is based on the Atom class, except that it uses atom types instead of elements, and all
attributes are lists rather than individual values. The attributes are:

Attribute Type Description


atomType list The allowed atom types (as AtomType objects)
radicalElectrons list The allowed numbers of radical electrons (as short integers)
charge list The allowed formal charges (as short integers)
label str A string label that can be used to tag individual atoms
lonePairs list The number of lone electron pairs
‘charge’ ‘’list’‘ The partial charge of the atom
props dict Dictionary for storing additional atom properties
reg_dim_atm list List of atom types that are free dimensions in tree optimization
reg_dim_u list List of unpaired electron numbers that are free dimensions in tree optimization
reg_dim_r list List of inRing values that are free dimensions in tree optimization

Each list represents a logical OR construct, i.e. an atom will match the group if it matches any item in the list.
However, the radicalElectrons, and charge attributes are linked such that an atom must match values from the
same index in each of these in order to match.
applyAction(self, list action)
Update the atom group as a result of applying action, a tuple containing the name of the reaction recipe
action along with any required parameters. The available actions can be found here.

128 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

atomType
list
Type atomType
charge
list
Type charge
connectivity1
‘short’
Type connectivity1
connectivity2
‘short’
Type connectivity2
connectivity3
‘short’
Type connectivity3
copy(self ) → Vertex
Return a deep copy of the GroupAtom object. Modifying the attributes of the copy will not affect the
original.
countBonds(self, wildcards=False) → list
Returns: list of the number of bonds currently on the :class:GroupAtom
If the argument wildcards is turned off then any bonds with multiple options for bond orders will not be
counted
edges
dict
Type edges
equivalent(self, Vertex other, bool strict=True) → bool
Returns True if other is equivalent to self or False if not, where other can be either an Atom or an
GroupAtom object. When comparing two GroupAtom objects, this function respects wildcards, e.g. R!H
is equivalent to C.
hasWildcards(self ) → bool
Return True if the atom has wildcards in any of the attributes: atomtype, radical electrons, lone pairs,
charge, and bond order. Returns ‘’False” if no attribute has wildcards.
ignore
‘bool’
Type ignore
isCarbon(self ) → bool
Return True if the atom represents an sulfur atom or False if not.
isNitrogen(self ) → bool
Return True if the atom represents an sulfur atom or False if not.
isOxygen(self ) → bool
Return True if the atom represents an oxygen atom or False if not.

1.6. Molecular representations (rmgpy.molecule) 129


RMG-Py API Reference, Release 2.4.1

isSpecificCaseOf(self, Vertex other) → bool


Returns True if self is the same as other or is a more specific case of other. Returns False if some of self
is not included in other or they are mutually exclusive.
isSulfur(self ) → bool
Return True if the atom represents an sulfur atom or False if not.
isSurfaceSite(self ) → bool
Return True if the atom represents a surface site or False if not.
label
str
Type label
lonePairs
list
Type lonePairs
makeSampleAtom(self ) → Atom
Returns: a class :Atom: object analagous to the GroupAtom
This makes a sample, so it takes the first element when there are multiple options inside of self.atomtype,
self.radicalElectrons, self.lonePairs, and self.charge
mapping
rmgpy.molecule.graph.Vertex
Type mapping
props
dict
Type props
radicalElectrons
list
Type radicalElectrons
reg_dim_atm
list
Type reg_dim_atm
reg_dim_r
list
Type reg_dim_r
reg_dim_u
list
Type reg_dim_u
resetConnectivityValues(self )
Reset the cached structure information for this vertex.
sortingLabel
‘short’
Type sortingLabel
terminal
‘bool’

130 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type terminal

rmgpy.molecule.GroupBond

class rmgpy.molecule.GroupBond(atom1, atom2, order=None)


A bond group. This class is based on the Bond class, except that all attributes are lists rather than individual
values. The allowed bond types are given here. The attributes are:

Attribute Type Description


order list The allowed bond orders (as character strings)
reg_dim Boolean Indicates if this is a regularization dimension during tree generation

Each list represents a logical OR construct, i.e. a bond will match the group if it matches any item in the list.
applyAction(self, list action)
Update the bond group as a result of applying action, a tuple containing the name of the reaction recipe
action along with any required parameters. The available actions can be found here.
copy(self ) → Edge
Return a deep copy of the GroupBond object. Modifying the attributes of the copy will not affect the
original.
equivalent(self, Edge other) → bool
Returns True if other is equivalent to self or False if not, where other can be either an Bond or an
GroupBond object.

getOrderNum(self ) → list
returns the bond order as a list of numbers
getOrderStr(self ) → list
returns a list of strings representing the bond order
getOtherVertex(self, Vertex vertex) → Vertex
Given a vertex that makes up part of the edge, return the other vertex. Raise a ValueError if the given
vertex is not part of the edge.
isBenzene(self, bool wildcards=False) → bool
Return True if the bond represents a benzene bond or False if not. If wildcards is False we return False
anytime there is more than one bond order, otherwise we return True if any of the options are benzene
isDouble(self, bool wildcards=False) → bool
Return True if the bond represents a double bond or False if not. If wildcards is False we return False
anytime there is more than one bond order, otherwise we return True if any of the options are double.
isHydrogenBond(self, wildcards=False)
Return True if the bond represents a hydrogen bond or False if not. If wildcards is False we return False
anytime there is more than one bond order, otherwise we return True if any of the options are hydrogen
bonds.
isQuadruple(self, wildcards=False)
Return True if the bond represents a quadruple bond or False if not. If wildcards is False we return
False anytime there is more than one bond order, otherwise we return True if any of the options are
quadruple.
isSingle(self, bool wildcards=False) → bool
Return True if the bond represents a single bond or False if not. If wildcards is False we return False
anytime there is more than one bond order, otherwise we return True if any of the options are single.
NOTE: we can replace the absolute value relation with math.isclose when we swtich to python 3.5+

1.6. Molecular representations (rmgpy.molecule) 131


RMG-Py API Reference, Release 2.4.1

isSpecificCaseOf(self, Edge other) → bool


Returns True if other is the same as self or is a more specific case of self. Returns False if some of self
is not included in other or they are mutually exclusive.
isTriple(self, bool wildcards=False) → bool
Return True if the bond represents a triple bond or False if not. If wildcards is False we return False
anytime there is more than one bond order, otherwise we return True if any of the options are triple.
isVanDerWaals(self, wildcards=False)
Return True if the bond represents a van der Waals bond or False if not. If wildcards is False we return
False anytime there is more than one bond order, otherwise we return True if any of the options are van
der Waals.
makeBond(self, Molecule molecule, Atom atom1, Atom atom2)
Creates a :class: Bond between atom1 and atom2 analogous to self
The intended input arguments should be class :Atom: not class :GroupAtom: :param atom1: First :class:
Atom the bond connects :param atom2: Second :class: Atom the bond connects
order
list
Type order
reg_dim
list
Type reg_dim
setOrderNum(self, list newOrder)
change the bond order with a list of numbers
setOrderStr(self, list newOrder)
set the bond order using a valid bond-order character list
vertex1
rmgpy.molecule.graph.Vertex
Type vertex1
vertex2
rmgpy.molecule.graph.Vertex
Type vertex2

rmgpy.molecule.Group

class rmgpy.molecule.Group(atoms=None, props=None, multiplicity=None)


A representation of a molecular substructure group using a graph data type, extending the Graph class. The
attributes are:

Attribute Type Description


atoms list Aliases for the vertices storing GroupAtom
multiplicity list Range of multiplicities accepted for the group
props dict Dictionary of arbitrary properties/flags classifying state of Group object

Corresponding alias methods to Molecule have also been provided.


addAtom(self, GroupAtom atom)
Add an atom to the graph. The atom is initialized with no bonds.

132 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

addBond(self, GroupBond bond )


Add a bond to the graph as an edge connecting the two atoms atom1 and atom2.
addEdge(self, Edge edge) → Edge
Add an edge to the graph. The two vertices in the edge must already exist in the graph, or a ValueError
is raised.
addExplicitLigands(self ) → bool
This function O2d/S2d ligand to CO or CS atomtypes if they are not already there.
Returns a ‘True’ if the group was modified otherwise returns ‘False’
addImplicitAtomsFromAtomType(self ) → Group
Returns: a modified group with implicit atoms added Add implicit double/triple bonded atoms O, S or R,
for which we will use a C
Not designed to work with wildcards
addImplicitBenzene(self ) → Group
Returns: A modified group with any implicit benzene rings added
This method currently does not if there are wildcards in atomtypes or bond orders The current algorithm
also requires that all Cb and Cbf are atomtyped
There are other cases where the algorithm doesn’t work. For example whenever there are many dangling
Cb or Cbf atoms not in a ring, it is likely fail. In the database test (the only use thus far), we will require
that any group with more than 3 Cbfs have complete rings. This is much stricter than this method can
handle, but right now this method cannot handle very general cases, so it is better to be conservative.
addVertex(self, Vertex vertex) → Vertex
Add a vertex to the graph. The vertex is initialized with no edges.
atoms
List of atoms contained in the current molecule.
Renames the inherited vertices attribute of Graph.
classifyBenzeneCarbons(self, dict partners=None) → tuple

Parameters
• group – :class:Group with atoms to classify
• partners – dictionary of partnered up atoms, which must be a cbf atom
Returns: tuple with lists of each atom classification
clearLabeledAtoms(self )
Remove the labels from all atoms in the molecular group.
containsLabeledAtom(self, str label) → bool
Return True if the group contains an atom with the label label and False otherwise.
containsSurfaceSite(self ) → bool
Returns True iff the group contains an ‘X’ surface site.
copy(self, bool deep=False) → Graph
Create a copy of the current graph. If deep is True, a deep copy is made: copies of the vertices and edges
are used in the new graph. If deep is False or not specified, a shallow copy is made: the original vertices
and edges are used in the new graph.
copyAndMap(self ) → dict
Create a deep copy of the current graph, and return the dict ‘mapping’. Method was modified from
Graph.copy() method

1.6. Molecular representations (rmgpy.molecule) 133


RMG-Py API Reference, Release 2.4.1

createAndConnectAtom(self, list atomtypes, GroupAtom connectingAtom, list bondOrders) →


GroupAtom
This method creates an non-radical, uncharged, :class:GroupAtom with specified list of atomtypes and
connects it to one atom of the group, ‘connectingAtom’. This is useful for making sample atoms.
Parameters
• atomtypes – list of atomtype labels (strs)
• connectingAtom – :class:GroupAtom that is connected to the new benzene atom
• bondOrders – list of bond Orders connecting newAtom and connectingAtom
Returns: the newly created atom
draw(self, format)
Use pydot to draw a basic graph of the group.
Use format to specify the desired output format, eg. ‘png’, ‘svg’, ‘ps’, ‘pdf’, ‘plain’, etc.
elementCount
dict
Type elementCount
findIsomorphism(self, Graph other, dict initialMap=None, bool saveOrder=False, bool strict=True)
→ list
Returns True if other is isomorphic and False otherwise, and the matching mapping. The initialMap
attribute can be used to specify a required mapping from self to other (i.e. the atoms of self are the keys,
while the atoms of other are the values). The returned mapping also uses the atoms of self for the keys and
the atoms of other for the values. The other parameter must be a Group object, or a TypeError is raised.
findSubgraphIsomorphisms(self, Graph other, dict initialMap=None, bool saveOrder=False) → list
Returns True if other is subgraph isomorphic and False otherwise. In other words, return True is self is
more specific than other. Also returns the lists all of valid mappings. The initialMap attribute can be used
to specify a required mapping from self to other (i.e. the atoms of self are the keys, while the atoms of
other are the values). The returned mappings also use the atoms of self for the keys and the atoms of other
for the values. The other parameter must be a Group object, or a TypeError is raised.
fromAdjacencyList(self, str adjlist)
Convert a string adjacency list adjlist to a molecular structure. Skips the first line (assuming it’s a label)
unless withLabel is False.
getAllCycles(self, Vertex startingVertex) → list
Given a starting vertex, returns a list of all the cycles containing that vertex.
This function returns a duplicate of each cycle because [0,1,2,3] is counted as separate from [0,3,2,1]
getAllCyclesOfSize(self, int size) → list
Return a list of the all non-duplicate rings with length ‘size’. The algorithm implements was adapted from
a description by Fan, Panaye, Doucet, and Barbu (doi: 10.1021/ci00015a002)
B. T. Fan, A. Panaye, J. P. Doucet, and A. Barbu. “Ring Perception: A New Algorithm for Directly Finding
the Smallest Set of Smallest Rings from a Connection Table.” J. Chem. Inf. Comput. Sci. 33, p. 657-662
(1993).
getAllCyclicVertices(self ) → list
Returns all vertices belonging to one or more cycles.
getAllEdges(self ) → list
Returns a list of all edges in the graph.
getAllPolycyclicVertices(self ) → list
Return all vertices belonging to two or more cycles, fused or spirocyclic.

134 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getAllSimpleCyclesOfSize(self, int size) → list


Return a list of all non-duplicate monocyclic rings with length ‘size’.
Naive approach by eliminating polycyclic rings that are returned by getAllCyclicsOfSize.
getBond(self, GroupAtom atom1, GroupAtom atom2) → GroupBond
Returns the bond connecting atoms atom1 and atom2.
getBonds(self, GroupAtom atom) → dict
Return a list of the bonds involving the specified atom.
getDisparateRings(self ) → tuple
Get all disjoint monocyclic and polycyclic cycle clusters in the molecule. Takes the RC and recursively
merges all cycles which share vertices.
Returns: monocyclic_cycles, polycyclic_cycles
getEdge(self, Vertex vertex1, Vertex vertex2) → Edge
Returns the edge connecting vertices vertex1 and vertex2.
getEdges(self, Vertex vertex) → dict
Return a dictionary of the edges involving the specified vertex.
getExtensions(self, R=None, basename=”, atmInd=None, atmInd2=None, Nsplits=None)
generate all allowed group extensions and their complements note all atomtypes except for elements and
R/R!H’s must be removed
getLabeledAtom(self, str label) → GroupAtom
Return the atom in the group that is labeled with the given label. Raises ValueError if no atom in the
group has that label.
getLabeledAtoms(self ) → dict
Return the labeled atoms as a dict with the keys being the labels and the values the atoms themselves. If
two or more atoms have the same label, the value is converted to a list of these atoms.
getLargestRing(self, Vertex vertex) → list
returns the largest ring containing vertex. This is typically useful for finding the longest path in a polycyclic
ring, since the polycyclic rings returned from getPolycyclicRings are not necessarily in order in the ring
structure.
getMaxCycleOverlap(self ) → int
Return the maximum number of vertices that are shared between any two cycles in the graph. For example,
if there are only disparate monocycles or no cycles, the maximum overlap is zero; if there are “spiro”
cycles, it is one; if there are “fused” cycles, it is two; and if there are “bridged” cycles, it is three.
getMonocyclicRings(self ) → list
Return a list of cycles that are monocyclic.
getNetCharge(self )
Iterate through the atoms in the group and calculate the net charge
getPolycyclicRings(self ) → list
Return a list of cycles that are polycyclic. In other words, merge the cycles which are fused or spirocyclic
into a single polycyclic cycle, and return only those cycles. Cycles which are not polycyclic are not
returned.
getRelevantCycles(self ) → list
Returns the set of relevant cycles as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021

1.6. Molecular representations (rmgpy.molecule) 135


RMG-Py API Reference, Release 2.4.1

Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of


Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
getSmallestSetOfSmallestRings(self ) → list
Returns the smallest set of smallest rings as a list of lists. Uses RingDecomposerLib for ring perception.
Kolodzik, A.; Urbaczek, S.; Rarey, M. Unique Ring Families: A Chemically Meaningful Description of
Molecular Ring Topologies. J. Chem. Inf. Model., 2012, 52 (8), pp 2013-2021
Flachsenberg, F.; Andresen, N.; Rarey, M. RingDecomposerLib: An Open-Source Implementation of
Unique Ring Families and Other Cycle Bases. J. Chem. Inf. Model., 2017, 57 (2), pp 122-126
get_edges_in_cycle(self, list vertices, bool sort=False) → list
For a given list of atoms comprising a ring, return the set of bonds connecting them, in order around the
ring.
If sort=True, then sort the vertices to match their connectivity. Otherwise, assumes that they are already
sorted, which is true for cycles returned by getRelevantCycles or getSmallestSetOfSmallestRings.
get_element_count(self ) → dict
Returns the element count for the molecule as a dictionary. Wildcards are not counted as any particular
element.
hasAtom(self, GroupAtom atom) → bool
Returns True if atom is an atom in the graph, or False if not.
hasBond(self, GroupAtom atom1, GroupAtom atom2) → bool
Returns True if atoms atom1 and atom2 are connected by an bond, or False if not.
hasEdge(self, Vertex vertex1, Vertex vertex2) → bool
Returns True if vertices vertex1 and vertex2 are connected by an edge, or False if not.
hasVertex(self, Vertex vertex) → bool
Returns True if vertex is a vertex in the graph, or False if not.
isAromaticRing(self ) → bool
This method returns a boolean telling if the group has a 5 or 6 cyclic with benzene bonds exclusively
isBenzeneExplicit(self ) → bool
Returns: ‘True’ if all Cb, Cbf atoms are in completely explicitly stated benzene rings.
Otherwise return ‘False’
isCyclic(self ) → bool
Return True if one or more cycles are present in the graph or False otherwise.
isEdgeInCycle(self, Edge edge) → bool
Return True if the edge between vertices vertex1 and vertex2 is in one or more cycles in the graph, or
False if not.

isIdentical(self, Graph other, bool saveOrder=False) → bool


Returns True if other is identical and False otherwise. The function isIsomorphic respects wildcards,
while this function does not, make it more useful for checking groups to groups (as opposed to molecules
to groups)
isIsomorphic(self, Graph other, dict initialMap=None, bool saveOrder=False, bool strict=True) →
bool
Returns True if two graphs are isomorphic and False otherwise. The initialMap attribute can be used to
specify a required mapping from self to other (i.e. the atoms of self are the keys, while the atoms of other
are the values). The other parameter must be a Group object, or a TypeError is raised.
isMappingValid(self, Graph other, dict mapping, bool equivalent=True, bool strict=True) → bool
Check that a proposed mapping of vertices from self to other is valid by checking that the vertices and

136 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

edges involved in the mapping are mutually equivalent. If equivalent is True it checks if atoms and edges
are equivalent, if False it checks if they are specific cases of each other. If strict is True, electrons and
bond orders are considered, and ignored if False.
isSubgraphIsomorphic(self, Graph other, dict initialMap=None, bool generateInitialMap=False,
bool saveOrder=False) → bool
Returns True if other is subgraph isomorphic and False otherwise. In other words, return True if self
is more specific than other. The initialMap attribute can be used to specify a required mapping from self
to other (i.e. the atoms of self are the keys, while the atoms of other are the values). The other parameter
must be a Group object, or a TypeError is raised.
isSurfaceSite(self ) → bool
Returns True iff the group is nothing but a surface site ‘X’.
isVertexInCycle(self, Vertex vertex) → bool
Return True if the given vertex is contained in one or more cycles in the graph, or False if not.
makeSampleMolecule(self ) → Molecule
Returns: A sample class :Molecule: from the group
merge(self, Graph other) → Graph
Merge two groups so as to store them in a single Group object. The merged Group object is returned.
mergeGroups(self, Group other) → Group
This function takes other :class:Group object and returns a merged :class:Group object based on overlap-
ping labeled atoms between self and other
Currently assumes other can be merged at the closest labelled atom
multiplicity
list
Type multiplicity
ordered_vertices
list
Type ordered_vertices
pickWildcards(self )
Returns: the :class:Group object without wildcards in either atomtype or bonding
This function will naively pick the first atomtype for each atom, but will try to pick bond orders that make
sense given the selected atomtypes
props
dict
Type props
radicalCount
‘short’
Type radicalCount
removeAtom(self, GroupAtom atom)
Remove atom and all bonds associated with it from the graph. Does not remove atoms that no longer have
any bonds as a result of this removal.
removeBond(self, GroupBond bond )
Remove the bond between atoms atom1 and atom2 from the graph. Does not remove atoms that no longer
have any bonds as a result of this removal.

1.6. Molecular representations (rmgpy.molecule) 137


RMG-Py API Reference, Release 2.4.1

removeEdge(self, Edge edge)


Remove the specified edge from the graph. Does not remove vertices that no longer have any edges as a
result of this removal.
removeVanDerWaalsBonds(self )
Remove all bonds that are definitely only van der Waals bonds.
removeVertex(self, Vertex vertex)
Remove vertex and all edges associated with it from the graph. Does not remove vertices that no longer
have any edges as a result of this removal.
resetConnectivityValues(self )
Reset any cached connectivity information. Call this method when you have modified the graph.
resetRingMembership(self )
Resets ring membership information in the GroupAtom.props attribute.
restore_vertex_order(self )
reorder the vertices to what they were before sorting if you saved the order
sortAtoms(self )
Sort the atoms in the graph. This can make certain operations, e.g. the isomorphism functions, much more
efficient.
sortByConnectivity(self, list atomList) → list

Parameters atomList – input list of atoms


Returns: a sorted list of atoms where each atom is connected to a previous atom in the list if possible
sortVertices(self, bool saveOrder=False)
Sort the vertices in the graph. This can make certain operations, e.g. the isomorphism functions, much
more efficient.
specifyAtomExtensions(self, i, basename, R)
generates extensions for specification of the type of atom defined by a given atomtype or set of atomtypes
specifyBondExtensions(self, i, j, basename, Rbonds)
generates extensions for the specification of bond order for a given bond
specifyExternalNewBondExtensions(self, i, basename, Rbonds)
generates extensions for the creation of a bond (of undefined order) between an atom and a new atom that
is not H
specifyInternalNewBondExtensions(self, i, j, Nsplits, basename, Rbonds)
generates extensions for creation of a bond (of undefined order) between two atoms indexed i,j that already
exist in the group and are unbonded
specifyRingExtensions(self, i, basename)
generates extensions for specifying if an atom is in a ring
specifyUnpairedExtensions(self, i, basename, Run)
generates extensions for specification of the number of electrons on a given atom
split(self ) → list
Convert a single Group object containing two or more unconnected groups into separate class:Group
objects.
standardizeAtomType(self ) → bool
This function changes the atomTypes in a group if the atom must be a specific atomType based on its bonds
and valency.
Currently only standardizes oxygen, carbon and sulfur atomTypes

138 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

We also only check when there is exactly one atomType, one bondType, one radical setting. For any group
where there are wildcards or multiple attributes, we cannot apply this check.
In the case where the atomType is ambigious based on bonds and valency, this function will not change
the type.
Returns a ‘True’ if the group was modified otherwise returns ‘False’
standardizeGroup(self ) → bool
This function modifies groups to make them have a standard AdjList form.
Currently it makes atomtypes as specific as possible and makes CO/CS atomtypes have explicit O2d/S2d
ligands. Other functions can be added as necessary
Returns a ‘True’ if the group was modified otherwise returns ‘False’
toAdjacencyList(self, str label=”)
Convert the molecular structure to a string adjacency list.
update(self )

updateConnectivityValues(self )
Update the connectivity values for each vertex in the graph. These are used to accelerate the isomorphism
checking.
updateFingerprint(self )
Update the molecular fingerprint used to accelerate the subgraph isomorphism checks.
update_charge(self )
Update the partial charge according to the valence electron, total bond order, lone pairs and radical elec-
trons. This method is used for products of specific families with recipes that modify charges.
vertices
list
Type vertices

rmgpy.molecule.resonance

This module contains methods for generation of resonance structures of molecules.


The main function to generate all relevant resonance structures for a given Molecule object is
generate_resonance_structures. It calls the necessary functions for generating each type of resonance
structure.
Currently supported resonance types:
• All species:
– generate_allyl_delocalization_resonance_structures: single radical shift with double
or triple bond
– generate_lone_pair_multiple_bond_resonance_structures: lone pair shift with double
or triple bond in a 3-atom system (between nonadjacent atoms)
– generate_adj_lone_pair_radical_resonance_structures: single radical shift with lone
pair between adjacent atoms
– generate_adj_lone_pair_multiple_bond_resonance_structures: multiple bond shift
with lone pair between adjacent atoms
– generate_adj_lone_pair_radical_multiple_bond_resonance_structures: multiple
bond and radical shift with lone pair and radical between adjacent atoms

1.6. Molecular representations (rmgpy.molecule) 139


RMG-Py API Reference, Release 2.4.1

– generate_N5dc_radical_resonance_structures: shift between radical and lone pair medi-


ated by an N5dc atom
– generate_aryne_resonance_structures: shift between cumulene and alkyne forms of arynes,
which are not considered aromatic in RMG
• Aromatic species only:
– generate_optimal_aromatic_resonance_structures: fully delocalized structure, where all
aromatic rings have benzene bonds
– generate_kekule_structure: generate a single Kekule structure for an aromatic compound (sin-
gle/double bond form)
– generate_opposite_kekule_structure: for monocyclic aromatic species, rotate the double
bond assignment
– generate_clar_structures: generate all structures with the maximum number of pi-sextet as-
signments
rmgpy.molecule.resonance.analyze_molecule
Identify key features of molecule important for resonance structure generation.
Returns a dictionary of features.
rmgpy.molecule.resonance.generate_N5dc_radical_resonance_structures
Generate all of the resonance structures formed by radical and lone pair shifts mediated by an N5dc atom.
rmgpy.molecule.resonance.generate_adj_lone_pair_multiple_bond_resonance_structures
Generate all of the resonance structures formed by lone electron pair - multiple bond shifts between adjacent
atoms. Example: [:NH]=[CH2] <=> [::NH-]-[CH2+] (where ‘:’ denotes a lone pair, ‘.’ denotes a radical, ‘-‘ not
in [] denotes a single bond, ‘-‘/’+’ denote charge) Here atom1 refers to the N/S/O atom, atom 2 refers to the any
R!H (atom2’s lonePairs aren’t affected) (In direction 1 atom1 <losses> a lone pair, in direction 2 atom1 <gains>
a lone pair)
rmgpy.molecule.resonance.generate_adj_lone_pair_radical_multiple_bond_resonance_structures
Generate all of the resonance structures formed by lone electron pair - radical - multiple bond shifts be-
tween adjacent atoms. Example: [:N.]=[CH2] <=> [::N]-[.CH2] (where ‘:’ denotes a lone pair, ‘.’ de-
notes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’ denote charge) Here atom1 refers to the N/S/O
atom, atom 2 refers to the any R!H (atom2’s lonePairs aren’t affected) This function is similar to gener-
ate_adj_lone_pair_multiple_bond_resonance_structures() except for dealing with the radical transformations.
(In direction 1 atom1 <losses> a lone pair, gains a radical, and atom2 looses a radical. In direction 2 atom1
<gains> a lone pair, looses a radical, and atom2 gains a radical)
rmgpy.molecule.resonance.generate_adj_lone_pair_radical_resonance_structures
Generate all of the resonance structures formed by lone electron pair - radical shifts between adjacent atoms.
These resonance transformations do not involve changing bond orders. NO2 example: O=[:N]-[::O.] <=>
O=[N.+]-[:::O-] (where ‘:’ denotes a lone pair, ‘.’ denotes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’
denote charge)
rmgpy.molecule.resonance.generate_allyl_delocalization_resonance_structures
Generate all of the resonance structures formed by one allyl radical shift.
Biradicals on a single atom are not supported.
rmgpy.molecule.resonance.generate_aromatic_resonance_structure
Generate the aromatic form of the molecule in place without considering other resonance.
Parameters
• mol – Molecule object to modify
• aromatic_bonds (optional) – list of previously identified aromatic bonds

140 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

• copy (optional) – copy the molecule if True, otherwise modify in place


Returns List of one molecule if successful, empty list otherwise
rmgpy.molecule.resonance.generate_aryne_resonance_structures
Generate aryne resonance structures, including the cumulene and alkyne forms.
For all 6-membered rings, check for the following bond patterns:
• DDDSDS
• STSDSD
This does NOT cover all possible aryne resonance forms, only the simplest ones. Especially for polycyclic
arynes, enumeration of all resonance forms is related to enumeration of all Kekule structures, which is very
difficult.
rmgpy.molecule.resonance.generate_clar_structures
Generate Clar structures for a given molecule.
Returns a list of Molecule objects corresponding to the Clar structures.
rmgpy.molecule.resonance.generate_isomorphic_resonance_structures
Select the resonance isomer that is isomorphic to the parameter isomer, with the lowest unpaired electrons
descriptor.
We generate over all resonance isomers (non-isomorphic as well as isomorphic) and retain isomorphic isomers.
If saturate_h is True, then saturate mol with hydrogens before generating the resonance structures, and remove
the hydrogens before returning isomorphic_isomers. This is useful when resonance structures are generated for
molecules in which all hydrogens were intentionally removed as in generating augInChI. Otherwise, RMG will
probably get many of the lonePairs and partial charges in a molecule wrong.
WIP: do not generate aromatic resonance isomers.
rmgpy.molecule.resonance.generate_kekule_structure
Generate a kekulized (single-double bond) form of the molecule. The specific arrangement of double bonds is
non-deterministic, and depends on RDKit.
Returns a single Kekule structure as an element of a list of length 1. If there’s an error (eg. in RDKit) then it
just returns an empty list.
rmgpy.molecule.resonance.generate_lone_pair_multiple_bond_resonance_structures
Generate all of the resonance structures formed by lone electron pair - multiple bond shifts in 3-atom systems.
Examples: aniline (Nc1ccccc1), azide, [:NH2]C=[::O] <=> [NH2+]=C[:::O-] (where ‘:’ denotes a lone pair, ‘.’
denotes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’ denote charge)
rmgpy.molecule.resonance.generate_optimal_aromatic_resonance_structures
Generate the aromatic form of the molecule. For radicals, generates the form with the most aromatic rings.
Returns result as a list. In most cases, only one structure will be returned. In certain cases where multiple forms
have the same number of aromatic rings, multiple structures will be returned. If there’s an error (eg. in RDKit)
it just returns an empty list.
rmgpy.molecule.resonance.generate_resonance_structures
Generate and return all of the resonance structures for the input molecule.
Most of the complexity of this method goes into handling aromatic species, particularly to generate an accurate
set of resonance structures that is consistent regardless of the input structure. The following considerations are
made:
1. False positives from RDKit aromaticity detection can occur if a molecule has exocyclic double bonds

1.6. Molecular representations (rmgpy.molecule) 141


RMG-Py API Reference, Release 2.4.1

2. False negatives from RDKit aromaticity detection can occur if a radical is delocalized into an aromatic
ring
3. sp2 hybridized radicals in the plane of an aromatic ring do not participate in hyperconjugation
4. Non-aromatic resonance structures of PAHs are not important resonance contributors (assumption)
Aromatic species are broken into the following categories for resonance treatment:
• Radical polycyclic aromatic species: Kekule structures are generated in order to generate adjacent reso-
nance structures. The resulting structures are then used for Clar structure generation. After all three steps,
any non-aromatic structures are removed, under the assumption that they are not important resonance
contributors.
• Radical monocyclic aromatic species: Kekule structures are generated along with adjacent resonance struc-
tures. All are kept regardless of aromaticity because the radical is more likely to delocalize into the ring.
• Stable polycyclic aromatic species: Clar structures are generated
• Stable monocyclic aromatic species: Kekule structures are generated
rmgpy.molecule.resonance.populate_resonance_algorithms
Generate list of resonance structure algorithms relevant to the current molecule.
Takes a dictionary of features generated by analyze_molecule(). Returns a list of resonance algorithms.

rmgpy.molecule.kekulize

This module contains functions for kekulization of a aromatic molecule. The only function that should be used outside
of this module is the main kekulize() function. The remaining functions and classes are designed only to support the
kekulization algorithm, and should not be used on their own.
The basic algorithm is as follows: 1. Identify all aromatic rings in the molecule, based on bond types. 2. For each
ring, identify endocyclic and exocyclic bonds. 3. Determine if any bonds in the ring are already defined (not benzene
bonds). 4. For the remaining bonds, determine whether or not they can be double bonds. 5. If a clear determination
cannot be made, make heuristic based assumption. 6. Continue until all bonds in the ring are determined. 7. Continue
until all rings in the molecule are determined.
Here, endo refers to bonds that comprise a given ring, while exo refers to bonds that are connected to atoms in the ring,
but not part of the ring itself.
A key part of the algorithm is use of degree of freedom (DOF) analysis in order to determine the optimal order to
solve the system. Rings and bonds with fewer DOFs have fewer ways to be to be kekulized, and are generally easier
to solve. Each ring or bond that is fixed reduces the DOF of adjacent rings and bonds, and the process continues until
the entire molecule can be solved.
class rmgpy.molecule.kekulize.AromaticBond(bond=None, ring_bonds=None, endo_dof=-
1, exo_dof=-1, double_possible=True, dou-
ble_required=False)
Helper class containing information about a single aromatic bond in a molecule.
DO NOT use outside of this module. This class does not do any aromaticity perception.
bond
rmgpy.molecule.molecule.Bond
Type bond
double_possible
‘bool’
Type double_possible

142 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

double_required
‘bool’
Type double_required
endo_dof
‘int’
Type endo_dof
exo_dof
‘int’
Type exo_dof
ring_bonds
set
Type ring_bonds
update(self )
Update the local degree of freedom information for this aromatic bond. The DOF counts do not include
the bond itself, only its adjacent bonds.
endo_dof refers to the number of adjacent bonds in the ring without fixed bond orders. exo_dof refers to
the number of adjacent bonds outside the ring without fixed bond orders.
class rmgpy.molecule.kekulize.AromaticRing(atoms=None, endo_bonds=None, exo_bonds=None,
endo_dof=-1, exo_dof=-1)
Helper class containing information about a single aromatic ring in a molecule.
DO NOT use outside of this module. This class does not do any aromaticity perception.
atoms
list
Type atoms
endo_dof
‘int’
Type endo_dof
exo_dof
‘int’
Type exo_dof
kekulize(self ) → bool
Attempts to kekulize a single aromatic ring in a molecule.
Returns True if successful, and False otherwise.
process_bonds(self ) → tuple
Create AromaticBond objects for each endocyclic bond.
resolved
list
Type resolved
unresolved
list
Type unresolved

1.6. Molecular representations (rmgpy.molecule) 143


RMG-Py API Reference, Release 2.4.1

update(self )
Update the degree of freedom information for this aromatic ring.
endo_dof refers to the number of bonds in the ring without fixed bond orders. exo_dof refers to the number
of bonds outside the ring without fixed bond orders.
rmgpy.molecule.kekulize.kekulize(Molecule mol)
Kekulize an aromatic molecule in place. If the molecule cannot be kekulized, a KekulizationError will be raised.
However, the molecule will be left in a semi-kekulized state. Therefore, if the original molecule needs to be
kept, it is advisable to create a copy before kekulizing.
Args: Molecule object to be kekulized

rmgpy.molecule.pathfinder

This module provides functions for searching paths within a molecule. The paths generally consist of alternating
atoms and bonds.
rmgpy.molecule.pathfinder.add_allyls
Find all the (3-atom, 2-bond) patterns “X=X-X” starting from the last atom of the existing path.
The bond attached to the starting atom should be non single. The second bond should be single.
rmgpy.molecule.pathfinder.add_inverse_allyls
Find all the (3-atom, 2-bond) patterns “start~atom2=atom3” starting from the last atom of the existing path.
The second bond should be non-single.
rmgpy.molecule.pathfinder.add_unsaturated_bonds
Find all the (2-atom, 1-bond) patterns “X=X” starting from the last atom of the existing path.
The bond attached to the starting atom should be non single.
rmgpy.molecule.pathfinder.compute_atom_distance
Compute the distances between each pair of atoms in the atom_indices.
The distance between two atoms is defined as the length of the shortest path between the two atoms minus 1,
because the start atom is part of the path.
The distance between multiple atoms is defined by generating all possible combinations between two atoms and
storing the distance between each combination of atoms in a dictionary.
The parameter ‘atom_indices’ is a list of 1-based atom indices.
rmgpy.molecule.pathfinder.find_N5dc_radical_delocalization_paths
Find all the resonance structures of an N5dc nitrogen atom with a single bond to a radical N/O/S site, another
single bond to a negatively charged N/O/S site, and one double bond (not participating in this transformation)
Example:
• N=[N+]([O])([O-]) <=> N=[N+]([O-])([O]), these structures are isomorphic but not identical, the transi-
tion is important for correct degeneracy calculations
In this transition atom1 is the middle N+ (N5dc), atom2 is the radical site, and atom3 is negatively charged A
“if atom1.atomType.label == ‘N5dc’” check should be done before calling this function
rmgpy.molecule.pathfinder.find_adj_lone_pair_multiple_bond_delocalization_paths
Find all the delocalization paths of atom1 which either
• Has a lonePair and is bonded by a single/double bond (e.g., [::NH-]-[CH2+], [::N-]=[CH+]) – direction 1
• Can obtain a lonePair and is bonded by a double/triple bond (e.g., [:NH]=[CH2], [:N]#[CH]) – direction 2
Giving the following resonance transitions, for example:

144 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

• [::NH-]-[CH2+] <=> [:NH]=[CH2]


• [:N]#[CH] <=> [::N-]=[CH+]
• other examples: S#N, N#[S], O=S([O])=O
Direction “1” is the direction <increasing> the bond order as in [::NH-]-[CH2+] <=> [:NH]=[CH2] Direction
“2” is the direction <decreasing> the bond order as in [:NH]=[CH2] <=> [::NH-]-[CH2+] (where ‘:’ denotes a
lone pair, ‘.’ denotes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’ denote charge) (In direction 1 atom1
<losses> a lone pair, in direction 2 atom1 <gains> a lone pair)
rmgpy.molecule.pathfinder.find_adj_lone_pair_radical_delocalization_paths
Find all the delocalization paths of lone electron pairs next to the radical center indicated by atom1. Used to
generate resonance isomers in adjacent N/O/S atoms. Two adjacent O atoms are not allowed since (a) currently
RMG has no good thermo/kinetics for R[:O+.][:::O-] which could have been generated as a resonance structure
of R[::O][::O.].
The radical site (atom1) could be either:
• N u1 p0, eg O=[N.+][:::O-]
• N u1 p1, eg R[:NH][:NH.]
• O u1 p1, eg [:O.+]=[::N-]; not allowed when adjacent to another O atom
• O u1 p2, eg O=N[::O.]; not allowed when adjacent to another O atom
• S u1 p0, eg O[S.+]([O-])=O
• S u1 p1, eg O[:S.+][O-]
• S u1 p2, eg O=N[::S.]
• any of the above with more than 1 radical where possible
The non-radical site (atom2) could respectively be:
• N u0 p1
• N u0 p2
• O u0 p2
• O u0 p3
• S u0 p1
• S u0 p2
• S u0 p3
(where ‘:’ denotes a lone pair, ‘.’ denotes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’ denote charge)
The bond between the sites does not have to be single, e.g.: [:O.+]=[::N-] <=> [::O]=[:N.]
rmgpy.molecule.pathfinder.find_adj_lone_pair_radical_multiple_bond_delocalization_paths
Find all the delocalization paths of atom1 which either
• Has a lonePair and is bonded by a single/double bond to a radical atom (e.g., [::N]-[.CH2])
• Can obtain a lonePair, has a radical, and is bonded by a double/triple bond (e.g., [:N.]=[CH2])
Giving the following resonance transitions, for example:
• [::N]-[.CH2] <=> [:N.]=[CH2]
• O[:S](=O)[::O.] <=> O[S.](=O)=[::O]

1.6. Molecular representations (rmgpy.molecule) 145


RMG-Py API Reference, Release 2.4.1

Direction “1” is the direction <increasing> the bond order as in [::N]-[.CH2] <=> [:N.]=[CH2] Direction “2” is
the direction <decreasing> the bond order as in [:N.]=[CH2] <=> [::N]-[.CH2] (where ‘:’ denotes a lone pair,
‘.’ denotes a radical, ‘-‘ not in [] denotes a single bond, ‘-‘/’+’ denote charge) (In direction 1 atom1 <losses> a
lone pair, gains a radical, and atom2 looses a radical. In direction 2 atom1 <gains> a lone pair, looses a radical,
and atom2 gains a radical)
rmgpy.molecule.pathfinder.find_allyl_delocalization_paths
Find all the delocalization paths allyl to the radical center indicated by atom1.
rmgpy.molecule.pathfinder.find_allyl_end_with_charge
Search for a (3-atom, 2-bond) path between start and end atom that consists of alternating non-single and single
bonds and ends with a charged atom.
Returns a list with atom and bond elements from start to end, or an empty list if nothing was found.
rmgpy.molecule.pathfinder.find_butadiene
Search for a path between start and end atom that consists of alternating non-single and single bonds.
Returns a list with atom and bond elements from start to end, or None if nothing was found.
rmgpy.molecule.pathfinder.find_butadiene_end_with_charge
Search for a (4-atom, 3-bond) path between start and end atom that consists of alternating non-single and single
bonds and ends with a charged atom.
Returns a list with atom and bond elements from start to end, or None if nothing was found.
rmgpy.molecule.pathfinder.find_lone_pair_multiple_bond_paths
Find all the delocalization paths between lone electron pair and multiple bond in a 3-atom system atom1 indi-
cates the localized lone pair site. Currently carbenes are excluded from this path.
Examples:
• N2O (N#[N+][O-] <-> [N-]=[N+]=O)
• Azide (N#[N+][NH-] <-> [N-]=[N+]=N <-> [N-2][N+]#[NH+])
• N#N group on sulfur (O[S-](O)[N+]#N <-> OS(O)=[N+]=[N-] <-> O[S+](O)#[N+][N-2])
• N[N+]([O-])=O <=> N[N+](=O)[O-], these structures are isomorphic but not identical, this transition is
important for correct degeneracy calculations
rmgpy.molecule.pathfinder.find_shortest_path

rmgpy.molecule.pathfinder.is_atom_able_to_gain_lone_pair
Helper function Returns True if atom is N/O/S and is able to <gain> an additional lone pair, False otherwise We
don’t allow O to remain with no lone pairs
rmgpy.molecule.pathfinder.is_atom_able_to_lose_lone_pair
Helper function Returns True if atom is N/O/S and is able to <loose> a lone pair, False otherwise We don’t allow
O to remain with no lone pairs

rmgpy.molecule.converter

This module provides methods for converting molecules between RMG, RDKit, and OpenBabel.
rmgpy.molecule.converter.debugRDKitMol
Takes an rdkit molecule object and logs some debugging information equivalent to calling rdmol.Debug() but
uses our logging framework. Default logging level is INFO but can be controlled with the level parameter. Also
returns the message as a string, should you want it for something.
rmgpy.molecule.converter.fromOBMol
Convert a OpenBabel Mol object obmol to a molecular structure. Uses OpenBabel to perform the conversion.

146 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.molecule.converter.fromRDKitMol
Convert a RDKit Mol object rdkitmol to a molecular structure. Uses RDKit to perform the conversion. This
Kekulizes everything, removing all aromatic atom types.
rmgpy.molecule.converter.toOBMol
Convert a molecular structure to an OpenBabel OBMol object. Uses OpenBabel to perform the conversion.
rmgpy.molecule.converter.toRDKitMol
Convert a molecular structure to a RDKit rdmol object. Uses RDKit to perform the conversion. Perceives
aromaticity and, unless removeHs==False, removes Hydrogen atoms.
If returnMapping==True then it also returns a dictionary mapping the atoms to RDKit’s atom indices.

rmgpy.molecule.translator

This module provides methods for translating to and from common molecule representation formats, e.g. SMILES,
InChI, SMARTS.
rmgpy.molecule.translator.fromAugmentedInChI
Creates a Molecule object from the augmented inchi.
First, the inchi is converted into a Molecule using the backend parsers.
Next, the multiplicity and unpaired electron information is used to fix a number of parsing errors made by the
backends.
Finally, the atom types of the corrected molecule are perceived.
Returns a Molecule object
rmgpy.molecule.translator.fromInChI
Convert an InChI string inchistr to a molecular structure. Uses a user-specified backend for conversion, currently
supporting rdkit (default) and openbabel.
rmgpy.molecule.translator.fromSMARTS
Convert a SMARTS string smartsstr to a molecular structure. Uses RDKit to perform the conversion. This
Kekulizes everything, removing all aromatic atom types.
rmgpy.molecule.translator.fromSMILES
Convert a SMILES string smilesstr to a molecular structure. Uses a user-specified backend for conversion,
currently supporting rdkit (default) and openbabel.
rmgpy.molecule.translator.toInChI
Convert a molecular structure to an InChI string. For aug_level=0, generates the canonical InChI. For
aug_level=1, appends the molecule multiplicity. For aug_level=2, appends positions of unpaired and paired
electrons.
Uses RDKit or OpenBabel for conversion.
Parameters
• choice of backend, 'try-all', 'rdkit', or 'openbabel' (backend) –
• level of augmentation, 0, 1, or 2 (aug_level) –
rmgpy.molecule.translator.toInChIKey
Convert a molecular structure to an InChI Key string. For aug_level=0, generates the canonical InChI. For
aug_level=1, appends the molecule multiplicity. For aug_level=2, appends positions of unpaired and paired
electrons.
Uses RDKit or OpenBabel for conversion.
Parameters

1.6. Molecular representations (rmgpy.molecule) 147


RMG-Py API Reference, Release 2.4.1

• choice of backend, 'try-all', 'rdkit', or 'openbabel' (backend) –


• level of augmentation, 0, 1, or 2 (aug_level) –
rmgpy.molecule.translator.toSMARTS
Convert a molecular structure to an SMARTS string. Uses RDKit to perform the conversion. Perceives aro-
maticity and removes Hydrogen atoms.
rmgpy.molecule.translator.toSMILES
Convert a molecular structure to an SMILES string.
If there is a Nitrogen/Sulfur atom present it uses OpenBabel to perform the conversion, and the SMILES may
or may not be canonical.
Otherwise, it uses RDKit to perform the conversion, so it will be canonical SMILES. While converting to an
RDMolecule it will perceive aromaticity and removes Hydrogen atoms.

Adjacency Lists

Note: The adjacency list syntax changed in July 2014. The minimal requirement for most translations is to prefix the
number of unpaired electrons with the letter u. The new syntax, however, allows much greater flexibility, including
definition of lone pairs, partial charges, wildcards, and molecule multiplicities.

Note: To quickly visualize any adjacency list, or to generate an adjacency list from other types of molecular rep-
resentations such as SMILES, InChI, or even common species names, use the Molecule Search tool found here:
http://rmg.mit.edu/molecule_search

An adjacency list is the most general way of specifying a chemical molecule or molecular pattern in RMG. It is based
on the adjacency list representation of the graph data type – the underlying data type for molecules and patterns in
RMG – but extended to allow for specification of extra semantic information.
The first line of most adjacency lists is a unique identifier for the molecule or pattern the adjacency list represents.
This is not strictly required, but is recommended in most cases. Generally the identifier should only use alphanumeric
characters and the underscore, as if an identifier in many popular programming languages. However, strictly speaking
any non-space ASCII character is allowed.
The subsequent lines may contain keyword-value pairs. Currently there is only one keyword, multiplicity.
For species or molecule declarations, the value after multiplicity defines the spin multiplicity of the molecule.
E.g. multiplicity 1 for most ground state closed shell species, multiplicity 2 for most radical species, and
multiplicity 3 for a triplet biradical. If the multiplicity line is not present then a value of (1 + number of
unpaired electrons) is assumed. Thus, it can usually be omitted, but if present can be used to distinguish, for example,
singlet CH2 from triplet CH2.
If defining a Functional Group, then the value must be a list, which defines the multiplicities that will be matched by
the group, eg. multiplicity [1,2,3] or, for a single value, multiplicity [1]. If a wildcard is desired, the
line 'multiplicity x can be used instead to accept all multiplicities. If the multiplicity line is omitted altogether,
then a wildcard is assumed.
e.g. the following two group adjlists represent identical groups.

group1
multiplicity x
1 R!H u0

148 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

group2
1 R!H u0

After the identifier line and keyword-value lines, each subsequent line describes a single atom and its local bond
structure. The format of these lines is a whitespace-delimited list with tokens

<number> [<label>] <element> u<unpaired> [p<pairs>] [c<charge>] <bondlist>

The first item is the number used to identify that atom. Any number may be used, though it is recommended to number
the atoms sequentially starting from one. Next is an optional label used to tag that atom; this should be an asterisk
followed by a unique number for the label, e.g. *1. In some cases (e.g. thermodynamics groups) there is only one
labeled atom, and the label is just an asterisk with no number: *.
After that is the atom’s element or atom type, indicated by its atomic symbol, followed by a sequence of tokens
describing the electronic state of the atom:
• u0 number of unpaired electrons (eg. radicals)
• p0 number of lone pairs of electrons, common on oxygen and nitrogen.
• c0 formal charge on the atom, e.g. c-1 (negatively charged), c0, c+1 (positively charged)
For Molecule definitions: The value must be a single integer (and for charge must have a + or - sign if not equal to
0) The number of unpaired electrons (i.e. radical electrons) is required, even if zero. The number of lone pairs and the
formal charge are assumed to be zero if omitted.
For Group definitions: The value can be an integer or a list of integers (with signs, for charges), eg. u[0,1,2] or
c[0,+1,+2,+3,+4], or may be a wildcard x which matches any valid value, eg. px is the same as p[0,1,2,3,4, .
..] and cx is the same as c[...,-4,-3,-2,-1,0,+1,+2,+3,+4,...]. Lists must be enclosed is square brackets,
and separated by commas, without spaces. If lone pairs or formal charges are omitted from a group definition, the
wildcard is assumed.
The last set of tokens is the list of bonds. To indicate a bond, place the number of the atom at the other end of the bond
and the bond type within curly braces and separated by a comma, e.g. {2,S}. Multiple bonds from the same atom
should be separated by whitespace.

Note: You must take care to make sure each bond is listed on the lines of both atoms in the bond, and that these
entries have the same bond type. RMG will raise an exception if it encounters such an invalid adjacency list.

When writing a molecular substructure pattern, you may specify multiple elements, radical counts, and bond types as
a comma-separated list inside square brackets. For example, to specify any carbon or oxygen atom, use the syntax
[C,O]. For a single or double bond to atom 2, write {2,[S,D]}.
Atom types such as R!H or Cdd may also be used as a shorthand. (Atom types like Cdd can also be used in full
molecules, but this use is discouraged, as RMG can compute them automatically for full molecules.)
Below is an example adjacency list, for 1,3-hexadiene, with the weakest bond in the molecule labeled with *1 and
*2. Note that hydrogen atoms can be omitted if desired, as their presence is inferred, provided that unpaired electrons,
lone pairs, and charges are all correctly defined:

HXD13
multiplicity 1
1 C u0 {2,D}
2 C u0 {1,D} {3,S}
3 C u0 {2,S} {4,D}
4 C u0 {3,D} {5,S}
5 *1 C u0 {4,S} {6,S}
6 *2 C u0 {5,S}

1.6. Molecular representations (rmgpy.molecule) 149


RMG-Py API Reference, Release 2.4.1

The allowed element types, radicals, and bonds are listed in the following table:

Notation Explanation
Chemical Element C Carbon atom
O Oxygen atom
H Hydrogen atom
S Sulfur atom
N Nitrogen atom
Nonreactive Elements Si Silicon atom
Cl Chlorine atom
He Helium atom
Ar Argon atom

Chemical Bond S Single Bond


D Double Bond
T Triple bond
B Benzene bond

rmgpy.molecule.adjlist.fromAdjacencyList(adjlist, group=False, saturateH=False)


Convert a string adjacency list adjlist into a set of Atom and Bond objects.
rmgpy.molecule.adjlist.toAdjacencyList(atoms, multiplicity, label=None, group=False, re-
moveH=False, removeLonePairs=False, oldStyle=False)
Convert a chemical graph defined by a list of atoms into a string adjacency list.

rmgpy.molecule.symmetry

rmgpy.molecule.symmetry.calculateAtomSymmetryNumber(Molecule molecule, Atom atom) → float


Return the symmetry number centered at atom in the structure. The atom of interest must not be in a cycle.
rmgpy.molecule.symmetry.calculateBondSymmetryNumber(Molecule molecule, Atom atom1, Atom
atom2) → float
Return the symmetry number centered at bond in the structure.
rmgpy.molecule.symmetry.calculateAxisSymmetryNumber(Molecule molecule) → float
Get the axis symmetry number correction. The “axis” refers to a series of two or more cumulated double bonds
(e.g. C=C=C, etc.). Corrections for single C=C bonds are handled in getBondSymmetryNumber().
Each axis (C=C=C) has the potential to double the symmetry number. If an end has 0 or 1 groups (eg. =C=CJJ
or =C=C-R) then it cannot alter the axis symmetry and is disregarded:

A=C=C=C.. A-C=C=C=C-A

s=1 s=1

If an end has 2 groups that are different then it breaks the symmetry and the symmetry for that axis is 1, no
matter what’s at the other end:

A\ A\ /A
T=C=C=C=C-A T=C=C=C=T
B/ A/ \B
s=1 s=1

If you have one or more ends with 2 groups, and neither end breaks the symmetry, then you have an axis
symmetry number of 2:

150 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

A\ /B A\
C=C=C=C=C C=C=C=C-B
A/ \B A/
s=2 s=2

rmgpy.molecule.symmetry.calculateCyclicSymmetryNumber(Molecule molecule) → float


Get the symmetry number correction for cyclic regions of a molecule. For complicated fused rings the smallest
set of smallest rings is used.
rmgpy.molecule.symmetry.calculateSymmetryNumber(Molecule molecule) → float
Return the symmetry number for the structure. The symmetry number includes both external and internal modes.

rmgpy.molecule.draw.MoleculeDrawer

class rmgpy.molecule.draw.MoleculeDrawer(options=None)
This class provides functionality for drawing the skeletal formula of molecules using the Cairo 2D graphics
engine. The most common use case is simply:

MoleculeDrawer().draw(molecule, format='png', path='molecule.png')

where molecule is the Molecule object to draw. You can also pass a dict of options to the constructor to affect
how the molecules are drawn.
draw(molecule, format, target=None)
Draw the given molecule using the given image format - pdf, svg, ps, or png. If path is given, the drawing
is saved to that location on disk. The options dict is an optional set of key-value pairs that can be used to
control the generated drawing.
This function returns the Cairo surface and context used to create the drawing, as well as a bounding box
for the molecule being drawn as the tuple (left, top, width, height).
render(cr, offset=None)
Uses the Cairo graphics library to create a skeletal formula drawing of a molecule containing the list of
atoms and dict of bonds to be drawn. The 2D position of each atom in atoms is given in the coordinates
array. The symbols to use at each atomic position are given by the list symbols. You must specify the Cairo
context cr to render to.

rmgpy.molecule.draw.ReactionDrawer

class rmgpy.molecule.draw.ReactionDrawer(options=None)
This class provides functionality for drawing chemical reactions using the skeletal formula of each reactant and
product molecule via the Cairo 2D graphics engine. The most common use case is simply:

ReactionDrawer().draw(reaction, format='png', path='reaction.png')

where reaction is the Reaction object to draw. You can also pass a dict of options to the constructor to affect
how the molecules are drawn.
draw(reaction, format, path=None)
Draw the given reaction using the given image format - pdf, svg, ps, or png. If path is given, the drawing
is saved to that location on disk.
This function returns the Cairo surface and context used to create the drawing, as well as a bounding box
for the molecule being drawn as the tuple (left, top, width, height).

1.6. Molecular representations (rmgpy.molecule) 151


RMG-Py API Reference, Release 2.4.1

1.7 Pressure dependence (rmgpy.pdep)

The rmgpy.pdep subpackage provides functionality for calcuating the pressure-dependent rate coefficients 𝑘(𝑇, 𝑃 )
for unimolecular reaction networks.
A unimolecular reaction network is defined by a set of chemically reactive molecular configurations - local minima on
a potential energy surface - divided into unimolecular isomers and bimolecular reactants or products. In our vernacular,
reactants can associate to form an isomer, while such association is neglected for products. These configurations are
connected by chemical reactions to form a network; these are referred to as path reactions. The system also consists of
an excess of inert gas M, representing a thermal bath; this allows for neglecting all collisions other than those between
an isomer and the bath gas.
An isomer molecule at sufficiently high internal energy can be transformed by a number of possible events:
• The isomer molecule can collide with any other molecule, resulting in an increase or decrease in energy
• The isomer molecule can isomerize to an adjacent isomer at the same energy
• The isomer molecule can dissociate into any directly connected bimolecular reactant or product channel
It is this competition between collision and reaction events that gives rise to pressure-dependent kinetics.

1.7.1 Collision events

Class Description
SingleExponentialDown A collisional energy transfer model based on the single exponential down model

1.7.2 Reaction events

Function Description
Return the microcanonical rate coefficient 𝑘(𝐸) for a reaction
calculateMicrocanonicalRateCoefficient()
applyRRKMTheory() Use RRKM theory to compute 𝑘(𝐸) for a reaction
applyInverseLaplaceTransformMethod() Use the inverse Laplace transform method to compute 𝑘(𝐸) for
a reaction

1.7.3 Pressure-dependent reaction networks

Class Description
Configuration A molecular configuration on a potential energy surface
Network A collisional energy transfer model based on the single exponential down model

1.7.4 The master equation

Function Description
generateFullMEMatrix() Return the full master equation matrix for a network

152 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.7.5 Master equation reduction methods

Function Description
msc.applyModifiedStrongCollisionMethod()
Reduce the master equation to phenomenological rate coefficients
𝑘(𝑇, 𝑃 ) using the modified strong collision method
rs.applyReservoirStateMethod() Reduce the master equation to phenomenological rate coefficients
𝑘(𝑇, 𝑃 ) using the reservoir state method
cse.applyChemicallySignificantEigenvaluesMethod()
Reduce the master equation to phenomenological rate coefficients
𝑘(𝑇, 𝑃 ) using the chemically-significant eigenvalues method

rmgpy.pdep.SingleExponentialDown

class rmgpy.pdep.SingleExponentialDown(alpha0=None, T0=None, n=0.0)


A representation of a single exponential down model of collisional energy transfer. The attributes are:

Attribute Description
alpha0 The average energy transferred in a deactivating collision at the reference temperature
T0 The reference temperature
n The temperature exponent

Based around the collisional energy transfer probability function

𝐸′ − 𝐸
(︂ )︂
𝑃 (𝐸, 𝐸 ′ ) = 𝐶(𝐸 ′ ) exp − 𝐸 < 𝐸′
𝛼

where the parameter 𝛼 = ⟨∆𝐸d ⟩ represents the average energy transferred in a deactivating collision. This is the
most commonly-used collision model, simply because it only has one parameter to determine. The parameter 𝛼
is specified using the equation
(︂ )︂𝑛
𝑇
𝛼 = 𝛼0
𝑇0

where 𝛼0 is the value of 𝛼 at temperature 𝑇0 in K. Set the exponent 𝑛 to zero to obtain a temperature-independent
value for 𝛼.
T0
The reference temperature.
alpha0
The average energy transferred in a deactivating collision at the reference temperature.
as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
calculateCollisionEfficiency(self, double T, ndarray Elist, ndarray Jlist, ndarray densStates,
double E0, double Ereac)
Calculate an efficiency factor for collisions, particularly useful for the modified strong collision method.
The collisions involve the given species with density of states densStates corresponding to energies Elist‘ in
J/mol, ground-state energy E0 in kJ/mol, and first reactive energy Ereac in kJ/mol. The collisions occur at
temperature T in K and are described by the average energy transferred in a deactivating collision dEdown
in kJ/mol. The algorithm here is implemented as described by Chang, Bozzelli, and Dean [?].

1.7. Pressure dependence (rmgpy.pdep) 153


RMG-Py API Reference, Release 2.4.1

generateCollisionMatrix(self, double T, ndarray densStates, ndarray Elist, ndarray Jlist=None)


Generate and return the collision matrix Mcoll /𝜔 = P − I corresponding to this collision model for a
given set of energies Elist in J/mol, temperature T in K, and isomer density of states densStates.
getAlpha(self, double T ) → double
Return the value of the 𝛼 parameter - the average energy transferred in a deactivating collision - in J/mol
at temperature T in K.
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
n
‘double’
Type n

Reaction events

Microcanonical rate coefficients

rmgpy.pdep.calculateMicrocanonicalRateCoefficient(reaction, ndarray Elist, ndarray Jlist,


ndarray reacDensStates, ndarray prod-
DensStates=None, double T=0.0)
Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol. reac-
DensStates and prodDensStates are the densities of states of the reactant and product configurations for this
reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction is reversible,
then both are required. This function will try to use the best method that it can based on the input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of freedom),
then RRKM theory will be used.
• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the inverse
Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also be provided.
For isomerization and association reactions prodDensStates is required; for dissociation reactions it is optional.
The temperature is used if provided in the detailed balance expression to determine the reverse kinetics, and in
certain cases in the inverse Laplace transform method.

RRKM theory

rmgpy.pdep.applyRRKMTheory(transitionState, ndarray Elist, ndarray Jlist, ndarray densStates)


Calculate the microcanonical rate coefficient for a reaction using RRKM theory, where transitionState is the
transition state of the reaction, Elist is the array of energies in J/mol at which to evaluate the microcanonial rate,
and densStates is the density of states of the reactant.
RRKM (Rice-Ramsperger-Kassel-Marcus) theory is the microcanonical analogue of transition state theory. The
microcanonical rate coefficient as a function of total energy 𝐸 and total angular momentum quantum number 𝐽

154 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

is given by

𝑁 ‡ (𝐸, 𝐽)
𝑘(𝐸, 𝐽) =
ℎ𝜌(𝐸, 𝐽)

where 𝑁 ‡ (𝐸, 𝐽) is the sum of states of the transition state and 𝜌(𝐸, 𝐽) is the density of states of the reactant. If
the J-rotor is treated as active, the J-dependence can be averaged in the above expression to give

𝑁 ‡ (𝐸)
𝑘(𝐸) =
ℎ𝜌(𝐸)

as a function of total energy alone. This is reasonable at high temperatures, but less accurate at low temperatures.
Use of RRKM theory requires detailed information about the statistical mechanics of the reactant and transition
state. However, it is generally more accurate than the inverse Laplace transform method.

Inverse Laplace transform method

rmgpy.pdep.applyInverseLaplaceTransformMethod(transitionState, Arrhenius kinetics, ndarray Elist,


ndarray Jlist, ndarray densStates, double T=0.0)
Calculate the microcanonical rate coefficient for a reaction using the inverse Laplace transform method, where
kinetics is the high pressure limit rate coefficient, E0 is the ground-state energy of the transition state, Elist is the
array of energies in kJ/mol at which to evaluate the microcanonial rate, and densStates is the density of states
of the reactant. The temperature T in K is not required, and is only used when the temperature exponent of the
Arrhenius expression is negative (for which the inverse transform is undefined).
The inverse Laplace transform method exploits the following relationship to determine the microcanonical rate
coefficient:
∫︁ ∞
ℒ [𝑘(𝐸)𝜌(𝐸)] = 𝑘(𝐸)𝜌(𝐸)𝑒−𝐸/𝑘B 𝑇 𝑑𝐸 = 𝑘∞ (𝑇 )𝑄(𝑇 )
0

Given a high-pressure limit rate coefficient 𝑘∞ (𝑇 ) represented as an Arrhenius expression with positive 𝑛 and
𝐸a , the microcanonical rate coefficient 𝑘(𝐸) can be determined via an inverse Laplace transform. For 𝑛 = 0
the transform can be defined analytically:

𝜌(𝐸 − 𝐸a )
𝑘(𝐸) = 𝐴 (𝑛 = 0)
𝜌(𝐸)

For 𝑛 > 0 the transform is defined numerically. For 𝑛 < 0 or 𝐸a < 0 the transform is not defined; in this case
we approximate by simply lumping the 𝑇 𝑛 or 𝑒−𝐸a /𝑅𝑇 terms into the preexponential factor, and use a different
𝑘(𝐸) at each temperature.
The ILT method does not required detailed transition state information, but only the high-pressure limit kinet-
ics. However, it assumes that (1) 𝑘∞ (𝑇 ) is valid over the temperature range from zero to infinity and (2) the
activation energy 𝐸a is physically identical to the reaction barrier 𝐸0‡ − 𝐸0 .

rmgpy.pdep.Configuration

class rmgpy.pdep.Configuration(*species)
A representation of a molecular configuration on a potential energy surface.
E0
The ground-state energy of the configuration in J/mol.
Elist
numpy.ndarray

1.7. Pressure dependence (rmgpy.pdep) 155


RMG-Py API Reference, Release 2.4.1

Type Elist
activeJRotor
‘bool’
Type activeJRotor
activeKRotor
‘bool’
Type activeKRotor
calculateCollisionFrequency(self, double T, double P, dict bathGas) → double
Return the value of the collision frequency in Hz at the given temperature T in K and pressure P in Pa. If a
dictionary bathGas of bath gas species and corresponding mole fractions is given, the collision parameters
of the bas gas species will be averaged with those of the species before computing the collision frequency.
Only the Lennard-Jones collision model is currently supported.
calculateDensityOfStates(self, ndarray Elist, bool activeJRotor=True, bool activeKRotor=True,
bool rmgmode=False)
Calculate the density (and sum) of states for the configuration at the given energies above the ground state
Elist in J/mol. The activeJRotor and activeKRotor flags control whether the J-rotor and/or K-rotor are
treated as active (and therefore included in the density and sum of states). The computed density and sum
of states arrays are stored on the object for future use.
cleanup(self )
Delete intermediate arrays used in computing k(T,P) values.
densStates
numpy.ndarray
Type densStates
generateCollisionMatrix(self, double T, ndarray densStates, ndarray Elist, ndarray Jlist=None) →
ndarray
Return the collisional energy transfer probabilities matrix for the configuration at the given temperature
T in K using the given energies Elist in kJ/mol and total angular momentum quantum numbers Jlist. The
density of states of the configuration densStates in mol/kJ is also required.
getEnthalpy(self, double T ) → double
Return the enthalpy in kJ/mol at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in kJ/mol at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the constant-pressure heat capacity in J/mol*K at the specified temperature T in K.
hasStatMech(self ) → bool
Return True if all species in the configuration have statistical mechanics parameters, or False otherwise.
hasThermo(self ) → bool
Return True if all species in the configuration have thermodynamics parameters, or False otherwise.
isBimolecular(self ) → bool
Return True if the configuration represents a bimolecular reactant or product channel, or False otherwise.
isTransitionState(self ) → bool
Return True if the configuration represents a transition state, or False otherwise.

156 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

isUnimolecular(self ) → bool
Return True if the configuration represents a unimolecular isomer, or False otherwise.
mapDensityOfStates(self, ndarray Elist, ndarray Jlist=None)
Return a mapping of the density of states for the configuration to the given energies Elist in J/mol and, if
the J-rotor is not active, the total angular momentum quantum numbers Jlist.
mapSumOfStates(self, ndarray Elist, ndarray Jlist=None)
Return a mapping of the density of states for the configuration to the given energies Elist in J/mol and, if
the J-rotor is not active, the total angular momentum quantum numbers Jlist.
species
list
Type species
sumStates
numpy.ndarray
Type sumStates

rmgpy.pdep.Network

class rmgpy.pdep.Network(label=”, isomers=None, reactants=None, products=None, pathRe-


actions=None, bathGas=None, netReactions=None, T=0.0, P=0.0,
Elist=None, Jlist=None, Ngrains=0, NJ=0, activeKRotor=True, active-
JRotor=True, grainSize=0.0, grainCount=0, E0=None)
A representation of a unimolecular reaction network. The attributes are:

1.7. Pressure dependence (rmgpy.pdep) 157


RMG-Py API Reference, Release 2.4.1

Attribute Description
isomers A list of the unimolecular isomers in the network
reactants A list of the bimolecular reactant channels (Configuration objects) in the network
products A list of the bimolecular product channels (Configuration objects) in the network
pathReac- A list of “path” reaction objects that connect adjacent isomers (the high-pressure-limit)
tions
bathGas A dictionary of the bath gas species (keys) and their mole fractions (values)
netReac- A list of “net” reaction objects that connect any pair of isomers
tions
T The current temperature in K
P The current pressure in bar
Elist The current array of energy grains in kJ/mol
Jlist The current array of total angular momentum quantum numbers
Nisom The number of unimolecular isomers in the network
Nreac The number of bimolecular reactant channels in the network
Nprod The number of bimolecular product channels in the network
Ngrains The number of energy grains
NJ The number of angular momentum grains
grainSize Maximum size of separation between energies
grainCount Minimum number of descrete energies separated
E0 A list of ground state energies of isomers, reactants, and products
activeKRo- True if the K-rotor is treated as active, False if treated as adiabatic
tor
activeJRotor True if the J-rotor is treated as active, False if treated as adiabatic
rmgmode True if in RMG mode, False otherwise
eqRatios An array containing concentration of each isomer and reactant channel present at equilibrium
collFreq An array of the frequency of collision between
Mcoll Matrix of first-order rate coefficients for collisional population transfer between grains for
each isomer
densStates 3D np array of stable configurations, number of grains, and number of J

applyChemicallySignificantEigenvaluesMethod(lumpingOrder=None)
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the chemically-
significant eigenvalues method. If a lumpingOrder is provided, the algorithm will attempt to lump the
configurations (given by index) in the order provided, and return a reduced set of 𝑘(𝑇, 𝑃 ) values.
applyModifiedStrongCollisionMethod(efficiencyModel=’default’)
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the modified
strong collision method.
applyReservoirStateMethod()
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the reservoir state
method.
calculateCollisionModel()
Calculate the matrix of first-order rate coefficients for collisional population transfer between grains for
each isomer, including the corresponding collision frequencies.
calculateDensitiesOfStates()
Calculate the densities of states of each configuration that has states data. The densities of states are
computed such that they can be applied to each temperature in the range of interest by interpolation.
calculateEquilibriumRatios()
Return an array containing the fraction of each isomer and reactant channel present at equilibrium, as
determined from the Gibbs free energy and using the concentration equilibrium constant 𝐾c . These values

158 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

are ratios, and the absolute magnitude is not guaranteed; however, the implementation scales the elements
of the array so that they sum to unity.
calculateMicrocanonicalRates()
Calculate and return arrays containing the microcanonical rate coefficients 𝑘(𝐸) for the isomerization,
dissociation, and association path reactions in the network.
getAllSpecies()
Return a list of all unique species in the network, including all isomers, reactant and product channels, and
bath gas species.
initialize(Tmin, Tmax, Pmin, Pmax, maximumGrainSize=0.0, minimumGrainCount=0, activeJRo-
tor=True, activeKRotor=True, rmgmode=False)
Initialize a pressure dependence calculation by computing several quantities that are independent of the
conditions. You must specify the temperature and pressure ranges of interesting using Tmin and Tmax in
K and Pmin and Pmax in Pa. You must also specify the maximum energy grain size grainSize in J/mol
and/or the minimum number of grains grainCount.
invalidate()
Mark the network as in need of a new calculation to determine the pressure-dependent rate coefficients
mapDensitiesOfStates()
Map the overall densities of states to the current energy grains. Semi-logarithmic interpolation will be
used if the grain sizes of Elist0 and Elist do not match; this should not be a significant source of error as
long as the grain sizes are sufficiently small.
printSummary(level=20)
Print a formatted list of information about the current network. Each molecular configuration - unimolec-
ular isomers, bimolecular reactant channels, and bimolecular product channels - is given along with its
energy on the potential energy surface. The path reactions connecting adjacent molecular configurations
are also given, along with their energies on the potential energy surface. The level parameter controls the
level of logging to which the summary is written, and is DEBUG by default.
selectEnergyGrains(T, grainSize=0.0, grainCount=0)
Select a suitable list of energies to use for subsequent calculations. This is done by finding the minimum
and maximum energies on the potential energy surface, then adding a multiple of 𝑘B 𝑇 onto the maximum
energy.
You must specify either the desired grain spacing grainSize in J/mol or the desired number of grains
Ngrains, as well as a temperature T in K to use for the equilibrium calculation. You can specify both
grainSize and grainCount, in which case the one that gives the more accurate result will be used (i.e. they
represent a maximum grain size and a minimum number of grains). An array containing the energy grains
in J/mol is returned.
setConditions(T, P, ymB=None)
Set the current network conditions to the temperature T in K and pressure P in Pa. All of the internal
variables are updated accordingly if they are out of date. For example, those variables that depend only on
temperature will not be recomputed if the temperature is the same.
solveFullME(tlist, x0)
Directly solve the full master equation using a stiff ODE solver. Pass the reaction network to solve, the
temperature T in K and pressure P in Pa to solve at, the energies Elist in J/mol to use, the output time points
tlist in s, the initial total populations x0, the full master equation matrix M, the accounting matrix indices
relating isomer and energy grain indices to indices of the master equation matrix, and the densities of states
densStates in mol/J of each isomer. Returns the times in s, population distributions for each isomer, and
total population profiles for each configuration.
solveReducedME(tlist, x0)
Directly solve the reduced master equation using a stiff ODE solver. Pass the output time points tlist in s
and the initial total populations x0. Be sure to run one of the methods for generating 𝑘(𝑇, 𝑃 ) values before

1.7. Pressure dependence (rmgpy.pdep) 159


RMG-Py API Reference, Release 2.4.1

calling this method. Returns the times in s, population distributions for each isomer, and total population
profiles for each configuration.

The master equation

rmgpy.pdep.me.generateFullMEMatrix(network, bool products=True)


Generate the full master equation matrix for the network.
An in-depth explanation can be found in the Master Equation section of the theory guide.

Methods for estimating k(T,P) values

The objective of each of the methods described in this section is to reduce the master equation into a small number of
phenomenological rate coefficients 𝑘(𝑇, 𝑃 ). All of the methods share a common formalism in that they seek to express
the population distribution vector p𝑖 for each unimolecular isomer 𝑖 as a linear combination of the total populations of
all unimolecular isomers and bimolecular reactant channels.

The modified strong collision method

rmgpy.pdep.msc.applyModifiedStrongCollisionMethod(network, str efficiencyModel=’default’)


The modified strong collision method utilizes a greatly simplified collision model that allows for a decoupling
of the energy grains. In the simplified collision model, collisional stabilization of a reactive isomer is treated as a
single-step process, ignoring the effects of collisional energy redistribution within the reactive energy space. An
attempt to correct for the effect of collisional energy redistribution is made by modifying the collision frequency
𝜔𝑖 (𝑇, 𝑃 ) with a collision efficiency 𝛽𝑖 (𝑇 ) estimated from the low-pressure limit fall-off of a single isomer.
By approximating the reactive populations as existing in pseudo-steady state, the master equation is converted
to a matrix equation is at each energy. Solving these small matrix equations gives the pseudo-steady state
populations of each isomer as a function of the total population of each isomer and reactant channel, which are
then applied to determine the 𝑘(𝑇, 𝑃 ) values.
In practice, the modified strong collision method is the fastest and most robust of the methods, and is reasonably
accurate over a wide range of temperatures and pressures.

The reservoir state method

rmgpy.pdep.rs.applyReservoirStateMethod(network)
In the reservoir state method, the population distribution of each isomer is partitioned into the low-energy grains
(called the reservoir) and the high-energy grains (called the active space). The partition generally occurs at or
near the lowest transition state energy for each isomer. The reservoir population is assumed to be thermalized,
while the active-space population is assumed to be in pseudo-steady state. Applying these approximations
converts the master equation into a single large matrix equation. Solving this matrix equation gives the pseudo-
steady state populations of each isomer as a function of the total population of each isomer and reactant channel,
which are then applied to determine the 𝑘(𝑇, 𝑃 ) values.
The reservoir state method is only slightly more expensive than the modified strong collision method. At low
temperatures the approximations used are very good, and the resulting 𝑘(𝑇, 𝑃 ) values are more accurate than the
modified strong collision values. However, at high temperatures the thermalized reservoir approximation breaks
down, resulting in very inaccurate 𝑘(𝑇, 𝑃 ) values. Thus, the reservoir state method is not robustly applicable
over a wide range of temperatures and pressures.

160 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

The chemically-significant eigenvalues method

rmgpy.pdep.cse.applyChemicallySignificantEigenvaluesMethod(network, list lumpin-


gOrder=None)
In the chemically-significant eigenvalues method, the master equation matrix is diagonized to determine its
eigenmodes. Only the slowest of these modes are relevant to the chemistry; the rest involve internal energy
relaxation due to collisions. Keeping only these “chemically-significant” eigenmodes allows for reduction to
𝑘(𝑇, 𝑃 ) values.
The chemically-significant eigenvalues method is the most accurate method, and is considered to be exact as
long as the chemically-significant eigenmodes are separable and distinct from the internal energy relaxation
eigenmodes. However, this is often only the case near the high-pressure limit, even for networks of only modest
size. The chemically-significant eigenvalues method is also substantially more expensive to apply than the other
methods.

1.8 QMTP (rmgpy.qm)

The rmgpy.qm subpackage contains classes and functions for working with molecular geometries, and interfacing
with quantum chemistry software.

1.8.1 Main

Class Description
QMSettings A class to store settings related to quantum mechanics calculations
QMCalculator An object to store settings and previous calculations

1.8.2 Molecule

Class Description
Geometry A geometry, used for quantum calculations
QMMolecule A base class for QM Molecule calculations

1.8.3 QM Data

Class/Function Description
QMData General class for data extracted from a QM calculation

1.8.4 QM Verifier

Class/Function Description
QMVerifier Verifies whether a QM job was succesfully completed

1.8. QMTP (rmgpy.qm) 161


RMG-Py API Reference, Release 2.4.1

1.8.5 Symmetry

Class/Function Description
PointGroup A symmetry Point Group
PointGroupCalculator Wrapper type to determine molecular symmetry point groups based on 3D coordi-
nates
SymmetryJob Determine the point group using the SYMMETRY program

1.8.6 Gaussian

Class/Function Description
Gaussian A base class for all QM calculations that use Gaussian
GaussianMol A base Class for calculations of molecules using Gaussian.
GaussianMolPM3 A base Class for calculations of molecules using Gaussian at PM3.
GaussianMolPM6 A base Class for calculations of molecules using Gaussian at PM6.

1.8.7 Mopac

Class/Function Description
Mopac A base class for all QM calculations that use Mopac
MopacMol A base Class for calculations of molecules using Mopac.
MopacMolPM3 A base Class for calculations of molecules using Mopac at PM3.
MopacMolPM6 A base Class for calculations of molecules using Mopac at PM6.
MopacMolPM7 A base Class for calculations of molecules using Mopac at PM7.

rmgpy.qm.main

class rmgpy.qm.main.QMSettings(software=None, method=’pm3’, fileStore=None, scratchDirec-


tory=None, onlyCyclics=True, maxRadicalNumber=0)
A minimal class to store settings related to quantum mechanics calculations.

Attribute Type Description


software str Quantum chemical package name in common letters
method str Semi-empirical method
fileStore str The path to the QMfiles directory
scratchDirectory str The path to the scratch directory
onlyCyclics bool True if to run QM only on ringed species
maxRadicalNumber int Radicals larger than this are saturated before applying HBI

checkAllSet()
Check that all the required settings are set.
class rmgpy.qm.main.QMCalculator(software=None, method=’pm3’, fileStore=None, scratchDirec-
tory=None, onlyCyclics=True, maxRadicalNumber=0)
A Quantum Mechanics calculator object, to store settings.
The attributes are:

162 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Type Description


settings QMSettings Settings for QM calculations
database ThermoLibrary Database containing QM calculations

checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
getThermoData(molecule)
Generate thermo data for the given Molecule via a quantum mechanics calculation.
Ignores the settings onlyCyclics and maxRadicalNumber and does the calculation anyway if asked. (I.e.
the code that chooses whether to call this method should consider those settings).
initialize()
Do any startup tasks.
runJobs(spc_list, procnum=1)
Run QM jobs for the provided species list (in parallel if requested).
setDefaultOutputDirectory(outputDirectory)
IF the fileStore or scratchDirectory are not already set, put them in here.

rmgpy.qm.molecule

class rmgpy.qm.molecule.Geometry(settings, uniqueID, molecule, uniqueIDlong=None)


A geometry, used for quantum calculations.
Created from a molecule. Geometry estimated by RDKit.
The attributes are:

Attribute Type Description


settings QMSettings Settings for QM calculations
uniqueID str A short ID such as an augmented InChI Key
molecule Molecule RMG Molecule object
uniqueIDlong str A long, truly unique ID such as an augmented InChI

generateRDKitGeometries()
Use RDKit to guess geometry.
Save mol files of both crude and refined. Saves coordinates on atoms.
getCrudeMolFilePath()
Returns the path of the crude mol file.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getRefinedMolFilePath()
Returns the path the the refined mol file.
rd_build()
Import rmg molecule and create rdkit molecule with the same atom labeling.

1.8. QMTP (rmgpy.qm) 163


RMG-Py API Reference, Release 2.4.1

rd_embed(rdmol, numConfAttempts)
Embed the RDKit molecule and create the crude molecule file.
saveCoordinatesFromQMData(qmdata)
Save geometry info from QMData (eg CCLibData)
uniqueID = None
A short unique ID such as an augmented InChI Key.
uniqueIDlong = None
Long, truly unique, ID, such as the augmented InChI.
class rmgpy.qm.molecule.QMMolecule(molecule, settings)
A base class for QM Molecule calculations.
Specific programs and methods should inherit from this and define some extra attributes and methods:
• outputFileExtension
• inputFileExtension
• generateQMData() . . . and whatever else is needed to make this method work.
The attributes are:

Attribute Type Description


molecule Molecule RMG Molecule object
settings QMSettings Settings for QM calculations
uniqueID str A short ID such as an augmented InChI Key
uniqueIDlong str A long, truly unique ID such as an augmented InChI

calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data somehow and return a CCLibData object, or None if it fails.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.

164 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFilePath
Get the input file name.
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords

rmgpy.qm.qmdata

class rmgpy.qm.qmdata.QMData(groundStateDegeneracy=-1, numberOfAtoms=None,


stericEnergy=None, molecularMass=None, energy=0, atomic-
Numbers=None, rotationalConstants=None, atomCoords=None,
frequencies=None, source=None)
General class for data extracted from a QM calculation
groundStateDegeneracy = None
Electronic ground state degeneracy in RMG taken as number of radicals +1
numberOfAtoms = None
Number of atoms.

rmgpy.qm.qmverifier

class rmgpy.qm.qmverifier.QMVerifier(molfile)

Verifies whether a QM job (externalized) was succesfully completed by

1.8. QMTP (rmgpy.qm) 165


RMG-Py API Reference, Release 2.4.1

• searching for specific keywords in the output files,


• located in a specific directory (e.g. “QMFiles”)
checkForInChiKeyCollision(logFileInChI )
This method is designed in the case a MOPAC output file was found but the InChI found in the file did not
correspond to the InChI of the given molecule.
This could mean two things: 1) that the InChI Key hash does not correspond to the InChI it is hashed from.
This is the rarest case of them all 2) the complete InChI did not fit onto just one line in the MOPAC output
file. Therefore it was continued on the second line and only a part of the InChI was actually taken as the
‘whole’ InChI.
This method reads in the MOPAC input file and compares the found InChI in there to the InChI of the
given molecule.
succesfulJobExists()
checks whether one of the flags is true. If so, it returns true.

rmgpy.qm.symmetry

class rmgpy.qm.symmetry.PointGroup(pointGroup, symmetryNumber, chiral)


A symmetry Point Group.
Attributes are:
• pointGroup
• symmetryNumber
• chiral
• linear
class rmgpy.qm.symmetry.PointGroupCalculator(settings, uniqueID, qmData)
Wrapper type to determine molecular symmetry point groups based on 3D coords information.
Will point to a specific algorithm, like SYMMETRY that is able to do this.
class rmgpy.qm.symmetry.SymmetryJob(settings, uniqueID, qmData)
Determine the point group using the SYMMETRY program
(http://www.cobalt.chem.ucalgary.ca/ps/symmetry/).
Required input is a line with number of atoms followed by lines for each atom including: 1) atom number 2)
x,y,z coordinates
finalTol determines how loose the point group criteria are; values are comparable to those specified in the
GaussView point group interface
calculate()
Do the entire point group calculation.
This writes the input file, then tries several times to run ‘symmetry’ with different parameters, until a point
group is found and returned.
inputFilePath
The input file’s path
parse(output)
Check the output string and extract the resulting point group, which is returned.
run(command )
Run the command, wait for it to finish, and return the stdout.

166 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

uniqueID = None
The object that holds information from a previous QM Job on 3D coords, molecule etc. . .
writeInputFile()
Write the input file for the SYMMETRY program.

rmgpy.qm.gaussian

class rmgpy.qm.gaussian.Gaussian
A base class for all QM calculations that use Gaussian.
Classes such as GaussianMol will inherit from this class.
failureKeys = ['ERROR TERMINATION', 'IMAGINARY FREQUENCIES']
List of phrases that indicate failure NONE of these must be present in a succesful job.
parse()
Parses the results of the Gaussian calculation, and returns a QMData object.
successKeys = ['Normal termination of Gaussian']
List of phrases to indicate success. ALL of these must be present in a successful job.
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the
molecule with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.
class rmgpy.qm.gaussian.GaussianMol(molecule, settings)
A base Class for calculations of molecules using Gaussian.
Inherits from both QMMolecule and Gaussian.
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup

1.8. QMTP (rmgpy.qm) 167


RMG-Py API Reference, Release 2.4.1

generateQMData()
Calculate the QM data and return a QMData object.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the
molecule with the given (augmented) InChI Key.

168 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.
class rmgpy.qm.gaussian.GaussianMolPM3(molecule, settings)
Gaussian PM3 calculations for molecules
This is a class of its own in case you wish to do anything differently, but for now it’s only the ‘pm3’ in the
keywords that differs.
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.

1.8. QMTP (rmgpy.qm) 169


RMG-Py API Reference, Release 2.4.1

getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
keywords = ['# pm3 opt=(verytight,gdiis) freq IOP(2/16=3)', '# pm3 opt=(verytight,gdiis) freq IO
Keywords that will be added at the top of the qm input file
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the
molecule with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.
class rmgpy.qm.gaussian.GaussianMolPM6(molecule, settings)
Gaussian PM6 calculations for molecules
This is a class of its own in case you wish to do anything differently, but for now it’s only the ‘pm6’ in the
keywords that differs.
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.

170 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
keywords = ['# pm6 opt=(verytight,gdiis) freq IOP(2/16=3)', '# pm6 opt=(verytight,gdiis) freq IO
Keywords that will be added at the top of the qm input file
loadThermoData()
Try loading a thermo data from a previous run.

1.8. QMTP (rmgpy.qm) 171


RMG-Py API Reference, Release 2.4.1

maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful GAUSSIAN simulation already exists for the
molecule with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all are satisfied, it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.

rmgpy.qm.mopac

class rmgpy.qm.mopac.Mopac
A base class for all QM calculations that use MOPAC.
Classes such as MopacMol will inherit from this class.
failureKeys = ['IMAGINARY FREQUENCIES', 'EXCESS NUMBER OF OPTIMIZATION CYCLES', 'NOT ENOUGH TIME
List of phrases that indicate failure NONE of these must be present in a succesful job.
getParser(outputFile)
Returns the appropriate cclib parser.
successKeys = ['DESCRIPTION OF VIBRATIONS', 'MOPAC DONE']
List of phrases to indicate success. ALL of these must be present in a successful job.
usePolar = False
Keywords for the multiplicity
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful MOPAC simulation already exists for the molecule
with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)

172 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

If any of the above criteria is not matched, False will be returned. If all succeed, then it will return True.
class rmgpy.qm.mopac.MopacMol(molecule, settings)
A base Class for calculations of molecules using MOPAC.
Inherits from both QMMolecule and Mopac.
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object, or None if it fails.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top, bottom, and polar keywords.

1.8. QMTP (rmgpy.qm) 173


RMG-Py API Reference, Release 2.4.1

inputFilePath
Get the input file name.
keywords = [{'top': 'precise nosym THREADS=1', 'bottom': 'oldgeo thermo nosym precise THREADS=
Keywords that will be added at the top and bottom of the qm input file
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful MOPAC simulation already exists for the molecule
with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all succeed, then it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.
class rmgpy.qm.mopac.MopacMolPM3(molecule, settings)
Mopac PM3 calculations for molecules
This is a class of its own in case you wish to do anything differently, but for now it’s the same as all the MOPAC
PMn calculations, only pm3
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries

174 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object, or None if it fails.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top, bottom, and polar keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords

1.8. QMTP (rmgpy.qm) 175


RMG-Py API Reference, Release 2.4.1

verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful MOPAC simulation already exists for the molecule
with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all succeed, then it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.
class rmgpy.qm.mopac.MopacMolPM6(molecule, settings)
Mopac PM6 calculations for molecules
This is a class of its own in case you wish to do anything differently, but for now it’s the same as all the MOPAC
PMn calculations, only pm6
calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object, or None if it fails.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule

176 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top, bottom, and polar keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
loadThermoData()
Try loading a thermo data from a previous run.
maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful MOPAC simulation already exists for the molecule
with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all succeed, then it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.
class rmgpy.qm.mopac.MopacMolPM7(molecule, settings)
Mopac PM7 calculations for molecules
This is a class of its own in case you wish to do anything differently, but for now it’s the same as all the MOPAC
PMn calculations, only pm7

1.8. QMTP (rmgpy.qm) 177


RMG-Py API Reference, Release 2.4.1

calculateChiralityCorrection()
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
calculateThermoData()
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qmData and self.pointGroup need to be gen-
erated before this method is called.
checkPaths()
Check the paths in the settings are OK. Make folders as necessary.
checkReady()
Check that it’s ready to run calculations.
createGeometry()
Creates self.geometry with RDKit geometries
determinePointGroup()
Determine point group using the SYMMETRY Program
Stores the resulting PointGroup in self.pointGroup
generateQMData()
Calculate the QM data and return a QMData object, or None if it fails.
generateThermoData()
Generate Thermo Data via a QM calc.
Returns None if it fails.
getFilePath(extension, scratch=True)
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the
fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
getInChiKeyAug()
Returns the augmented InChI from self.molecule
getMolFilePathForCalculation(attempt)
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.scriptAttempts then we use the refined coordinates, then we start to use the crude coor-
dinates.
getParser(outputFile)
Returns the appropriate cclib parser.
getThermoFilePath()
Returns the path the thermo data file.
initialize()
Do any startup tasks.
inputFileKeywords(attempt)
Return the top, bottom, and polar keywords for attempt number attempt.
NB. attempt begins at 1, not 0.
inputFilePath
Get the input file name.
loadThermoData()
Try loading a thermo data from a previous run.

178 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

maxAttempts
The total number of attempts to try
outputFilePath
Get the output file name.
parse()
Parses the results of the Mopac calculation, and returns a QMData object.
saveThermoData()
Save the generated thermo data.
scriptAttempts
The number of attempts with different script keywords
verifyOutputFile()
Check’s that an output file exists and was successful.
Returns a boolean flag that states whether a successful MOPAC simulation already exists for the molecule
with the given (augmented) InChI Key.
The definition of finding a successful simulation is based on these criteria: 1) finding an output file with
the file name equal to the InChI Key 2) NOT finding any of the keywords that are denote a calculation
failure 3) finding all the keywords that denote a calculation success. 4) finding a match between the InChI
of the given molecule and the InchI found in the calculation files 5) checking that the optimized geometry,
when connected by single bonds, is isomorphic with self.molecule (converted to single bonds)
If any of the above criteria is not matched, False will be returned. If all succeed, then it will return True.
writeInputFile(attempt)
Using the Geometry object, write the input file for the attempt.

1.9 Physical quantities (rmgpy.quantity)

A physical quantity is defined by a numerical value and a unit of measurement.


The rmgpy.quantity module contains classes and methods for working with physical quantities. Physical quantities
are represented by either the ScalarQuantity or ArrayQuantity class depending on whether a scalar or vector (or
tensor) value is used. The Quantity function automatically chooses the appropriate class based on the input value.
In both cases, the value of a physical quantity is available from the value attribute, and the units from the units
attribute.
For efficient computation, the value is stored internally in the SI equivalent units. The SI value can be accessed directly
using the value_si attribute. Usually it is good practice to read the value_si attribute into a local variable and then
use it for computations, especially if it is referred to multiple times in the calculation.
Physical quantities also allow for storing of uncertainty values for both scalars and arrays. The uncertaintyType at-
tribute indicates whether the given uncertainties are additive ("+|-") or multiplicative ("*|/"), and the uncertainty
attribute contains the stored uncertainties. For additive uncertainties these are stored in the given units (not the SI equiv-
alent), since they are generally not needed for efficient computations. For multiplicative uncertainties, the uncertainty
values are by definition dimensionless.

1.9. Physical quantities (rmgpy.quantity) 179


RMG-Py API Reference, Release 2.4.1

1.9.1 Quantity objects

Class Description
ScalarQuantity A scalar physical quantity, with units and uncertainty
ArrayQuantity An array physical quantity, with units and uncertainty
Quantity() Return a scalar or array physical quantity

1.9.2 Unit types

Units can be classified into categories based on the associated dimensionality. For example, miles and kilometers
are both units of length; seconds and hours are both units of time, etc. Clearly, quantities of different unit types are
fundamentally different.
RMG provides functions that create physical quantities (scalar or array) and validate the units for a variety of unit
types. This prevents the user from inadvertently mixing up their units - e.g. by setting an enthalpy with entropy units
- which should reduce errors. RMG recognizes the following unit types:

Function Unit type SI unit


Acceleration() acceleration m/s2
Area() area m2
Concentration() concentration mol/cm3
Dimensionless() dimensionless
Energy() energy J/mol
Entropy() entropy J/mol · K
Flux() flux mol/cm2 · s
Frequency() frequency cm−1
Force() force N
Inertia() inertia kg · m2
Length() length m
Mass() mass kg
Momentum() momentum kg · m/s2
Power() power W
Pressure() pressure Pa
RateCoefficient() rate coefficient s−1 , m3 /mol · s, m6 /mol2 · s, m9 /mol3 · s
Temperature() temperature K
Time() time s
Velocity() velocity m/s
Volume() volume m3

In RMG, all energies, heat capacities, concentrations, fluxes, and rate coefficients are treated as intensive; this means
that these quantities are always expressed “per mole” or “per molecule”. All other unit types are extensive. A special
exception is added for mass so as to allow for coercion of g/mol to amu.
RMG also handles rate coefficient units as a special case, as there are multiple allowed dimensionalities based on the
reaction order. Note that RMG generally does not attempt to verify that the rate coefficient units match the reaction
order, but only that it matches one of the possibilities.
The table above gives the SI unit that RMG uses internally to work with physical quantities. This does not necessarily
correspond with the units used when outputting values. For example, pressures are often output in units of bar instead
of Pa, and moments of inertia in amu * angstrom2 instead of kg * m2 . The recommended rule of thumb is to use
prefixed SI units (or aliases thereof) in the output; for example, use kJ/mol instead of kcal/mol for energy values.

180 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.quantity.ScalarQuantity

class rmgpy.quantity.ScalarQuantity(value=0.0, units=”, uncertainty=0.0, uncertaintyType=’+|-’)


The ScalarQuantity class provides a representation of a scalar physical quantity, with optional units and
uncertainty information. The attributes are:

Attribute Description
value The numeric value of the quantity in the given units
units The units the value was specified in
uncertainty The numeric uncertainty in the value in the given units (unitless if multiplicative)
uncertainty- The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
Type
value_si The numeric value of the quantity in the corresponding SI units
uncertainty_si The numeric value of the uncertainty in the corresponding SI units (unitless if multiplica-
tive)

It is often more convenient to perform computations using SI units instead of the given units of the quantity. For
this reason, the SI equivalent of the value attribute can be directly accessed using the value_si attribute. This
value is cached on the ScalarQuantity object for speed.
as_dict(self ) → dict
A helper function for YAML dumping
copy(self ) → ScalarQuantity
Return a copy of the quantity.
equals(self, quantity)
Return True if the everything in a quantity object matches the parameters in this object. If there are lists
of values or uncertainties, each item in the list must be matching and in the same order. Otherwise, return
False (Originally intended to return warning if units capitalization was different, however, Quantity object
only parses units matching in case, so this will not be a problem.)
getConversionFactorFromSI(self ) → double
Return the conversion factor for converting a quantity to a given set of units from the SI equivalent units.
getConversionFactorFromSItoCmMolS(self ) → double
Return the conversion factor for converting into SI units only with all lengths in cm, instead of m. This
is useful for outputting chemkin file kinetics. Depending on the stoichiometry of the reaction the reaction
rate coefficient could be /s, cm^3/mol/s, cm^6/mol^2/s, and for heterogeneous reactions even more possi-
bilities. Only lengths are changed. Everything else is in SI, i.e. moles (not molecules) and seconds (not
minutes).
getConversionFactorToSI(self ) → double
Return the conversion factor for converting a quantity in a given set of‘units‘ to the SI equivalent units.
getUncertainty(self )
The numeric value of the uncertainty, in the given units if additive, or no units if multiplicative.
getUncertaintyType(self ) → str
The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
getValue(self )
The numeric value of the quantity, in the given units
isUncertaintyAdditive(self ) → bool
Return True if the uncertainty is specified in additive format and False otherwise.
isUncertaintyMultiplicative(self ) → bool
Return True if the uncertainty is specified in multiplicative format and False otherwise.

1.9. Physical quantities (rmgpy.quantity) 181


RMG-Py API Reference, Release 2.4.1

make_object(self, dict data, dict class_dict)


A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
setUncertainty(self, v)
setUncertaintyType(self, str v)
Check the uncertainty type is valid, then set it.
setValue(self, v)

uncertainty
ScalarQuantity.getUncertainty(self)
The numeric value of the uncertainty, in the given units if additive, or no units if multiplicative.
uncertaintyType
ScalarQuantity.getUncertaintyType(self) -> str
The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
uncertainty_si
‘double’
Type uncertainty_si
units
str
Type units
value
ScalarQuantity.getValue(self)
The numeric value of the quantity, in the given units
value_si
‘double’
Type value_si

rmgpy.quantity.ArrayQuantity

class rmgpy.quantity.ArrayQuantity(value=None, units=”, uncertainty=None,


uncertaintyType=’+|-’)
The ArrayQuantity class provides a representation of an array of physical quantity values, with optional units
and uncertainty information. The attributes are:

182 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Description
value The numeric value of the quantity in the given units
units The units the value was specified in
uncertainty The numeric uncertainty in the value (unitless if multiplicative)
uncertainty- The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
Type
value_si The numeric value of the quantity in the corresponding SI units
uncertainty_si The numeric value of the uncertainty in the corresponding SI units (unitless if multiplica-
tive)

It is often more convenient to perform computations using SI units instead of the given units of the quantity. For
this reason, the SI equivalent of the value attribute can be directly accessed using the value_si attribute. This
value is cached on the ArrayQuantity object for speed.
as_dict(self ) → dict
A helper function for YAML dumping
copy(self ) → ArrayQuantity
Return a copy of the quantity.
equals(self, quantity)
Return True if the everything in a quantity object matches the parameters in this object. If there are lists
of values or uncertainties, each item in the list must be matching and in the same order. Otherwise, return
False (Originally intended to return warning if units capitalization was different, however, Quantity object
only parses units matching in case, so this will not be a problem.)
getConversionFactorFromSI(self ) → double
Return the conversion factor for converting a quantity to a given set of units from the SI equivalent units.
getConversionFactorFromSItoCmMolS(self ) → double
Return the conversion factor for converting into SI units only with all lengths in cm, instead of m. This
is useful for outputting chemkin file kinetics. Depending on the stoichiometry of the reaction the reaction
rate coefficient could be /s, cm^3/mol/s, cm^6/mol^2/s, and for heterogeneous reactions even more possi-
bilities. Only lengths are changed. Everything else is in SI, i.e. moles (not molecules) and seconds (not
minutes).
getConversionFactorToSI(self ) → double
Return the conversion factor for converting a quantity in a given set of‘units‘ to the SI equivalent units.
getUncertainty(self )
The numeric value of the uncertainty, in the given units if additive, or no units if multiplicative.
getUncertaintyType(self ) → str
The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
getValue(self )
The numeric value of the array quantity, in the given units.
isUncertaintyAdditive(self ) → bool
Return True if the uncertainty is specified in additive format and False otherwise.
isUncertaintyMultiplicative(self ) → bool
Return True if the uncertainty is specified in multiplicative format and False otherwise.
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object

1.9. Physical quantities (rmgpy.quantity) 183


RMG-Py API Reference, Release 2.4.1

• class_dict (dict) – A mapping of class names to the classes themselves


Returns None
setUncertainty(self, v)

setUncertaintyType(self, str v)
Check the uncertainty type is valid, then set it.
If you set the uncertainty then change the type, we have no idea what to do with the units. This ensures
you set the type first.
setValue(self, v)

uncertainty
ArrayQuantity.getUncertainty(self)
The numeric value of the uncertainty, in the given units if additive, or no units if multiplicative.
uncertaintyType
ArrayQuantity.getUncertaintyType(self) -> str
The type of uncertainty: '+|-' for additive, '*|/' for multiplicative
uncertainty_si
numpy.ndarray
Type uncertainty_si
units
str
Type units
value
ArrayQuantity.getValue(self)
The numeric value of the array quantity, in the given units.
value_si
numpy.ndarray
Type value_si

rmgpy.quantity.Quantity

rmgpy.quantity.Quantity(*args, **kwargs)
Create a ScalarQuantity or ArrayQuantity object for a given physical quantity. The physical quantity can
be specified in several ways:
• A scalar-like or array-like value (for a dimensionless quantity)
• An array of arguments (including keyword arguments) giving some or all of the value, units, uncertainty,
and/or uncertaintyType.
• A tuple of the form (value,), (value,units), (value,units,uncertainty), or (value,units,
uncertaintyType,uncertainty)

• An existing ScalarQuantity or ArrayQuantity object, for which a copy is made

184 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.10 Reactions (rmgpy.reaction)

The rmgpy.reaction subpackage contains classes and functions for working with chemical reaction.

1.10.1 Reaction

Class Description
Reaction A chemical reaction

rmgpy.reaction.Reaction

class rmgpy.reaction.Reaction(index=-1, label=”, reactants=None, products=None, specific-


Collider=None, kinetics=None, network_kinetics=None, re-
versible=True, transitionState=None, duplicate=False, degeneracy=1,
pairs=None, allow_pdep_route=False, elementary_high_p=False,
allow_max_rate_violation=False, rank=None, comment=”,
is_forward=None)
A chemical reaction. The attributes are:

1.10. Reactions (rmgpy.reaction) 185


RMG-Py API Reference, Release 2.4.1

At- Type Description


tribute
index int A unique nonnegative integer index
label str A descriptive string label
reac- list The reactant species (as Species objects)
tants
prod- list The product species (as Species objects)
ucts
‘speci- SpeciesThe collider species (as a Species object)
fic-
Col-
lider’
ki- KineticsModel
The kinetics model to use for the reaction
net-
ics
net- Arrhenius
The kinetics model to use for PDep network exploration if the kinetics attribute is
work_kinetics :class:PDepKineticsModel:
re- bool True if the reaction is reversible, False if not
versible
tran- TransitionState
The transition state
si-
tion-
State
du- bool True if the reaction is known to be a duplicate, False if not
pli-
cate
de- double The reaction path degeneracy for the reaction
gen-
er-
acy
pairs list Reactant-product pairings to use in converting reaction flux to species flux
al- bool True if the reaction has an additional PDep pathway, False if not (by default), used for
low_pdep_route LibraryReactions
ele- bool If True, pressure dependent kinetics will be generated (relevant only for unimolecular li-
men- brary reactions) If False (by default), this library reaction will not be explored. Only
tary_high_p unimolecular library reactions with high pressure limit kinetics should be flagged (not if
the kinetics were measured at some relatively low pressure)
com- str A description of the reaction source (optional)
ment
bool
is_forward Indicates if the reaction was generated in the forward (true) or reverse (false)
rank int Integer indicating the accuracy of the kinetics for this reaction

allow_max_rate_violation
‘bool’
Type allow_max_rate_violation
allow_pdep_route
‘bool’
Type allow_pdep_route
calculateMicrocanonicalRateCoefficient(self, ndarray Elist, ndarray Jlist, ndarray reac-
DensStates, ndarray prodDensStates=None, double
T=0.0)

186 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol.
reacDensStates and prodDensStates are the densities of states of the reactant and product configurations
for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction
is reversible, then both are required. This function will try to use the best method that it can based on the
input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of free-
dom), then RRKM theory will be used.
• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the
inverse Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also
be provided. For isomerization and association reactions prodDensStates is required; for dissociation
reactions it is optional. The temperature is used if provided in the detailed balance expression to determine
the reverse kinetics, and in certain cases in the inverse Laplace transform method.
calculateTSTRateCoefficient(self, double T ) → double
Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature
T in K using (canonical) transition state theory. The TST equation is

𝑄‡ (𝑇 )
(︂ )︂
𝑘B 𝑇 𝐸0
𝑘(𝑇 ) = 𝜅(𝑇 ) exp −
ℎ 𝑄A (𝑇 )𝑄B (𝑇 ) 𝑘B 𝑇

where 𝑄‡ is the partition function of the transition state, 𝑄A and 𝑄B are the partition function of the
reactants, 𝐸0 is the ground-state energy difference from the transition state to the reactants, 𝑇 is the
absolute temperature, 𝑘B is the Boltzmann constant, and ℎ is the Planck constant. 𝜅(𝑇 ) is an optional
tunneling correction.
calculateTSTRateCoefficients(self, ndarray Tlist) → ndarray

calculate_coll_limit(self, float temp, bool reverse=False)


Calculate the collision limit rate for the given temperature implemented as recommended in Wang et al.
doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)
canTST(self ) → bool
Return True if the necessary parameters are available for using transition state theory – or the microcanon-
ical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.
check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) → list
Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the
relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the
reaction object and the direction in which the violation was detected.
comment
str
Type comment
copy(self )
Create a deep copy of the current reaction.
degeneracy
The reaction path degeneracy for this reaction.
If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new
degeneracy to the old degeneracy.
draw(self, path)
Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify
the file to save the generated image to; the image type is automatically determined by extension. Valid

1.10. Reactions (rmgpy.reaction) 187


RMG-Py API Reference, Release 2.4.1

extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
duplicate
‘bool’
Type duplicate
elementary_high_p
‘bool’
Type elementary_high_p
ensure_species(self, bool reactant_resonance=False, bool product_resonance=False)
Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found
to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.
Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or
product_resonance, are True. Does not generate resonance for reactants or products that start as Species
objects.
fixBarrierHeight(self, bool forcePositive=False)
Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least
the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi
with an exothermic reaction. If forcePositive is True, then all reactions are forced to have a non-negative
barrier.
fixDiffusionLimitedA(self, T )
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the
specified temperature.
generate3dTS(self, reactants, products)
Generate the 3D structure of the transition state. Called from model.generateKinetics().
self.reactants is a list of reactants self.products is a list of products
generatePairs(self )
Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact
procedure for doing so depends on the reaction type:

Reaction type Template Resulting pairs


Isomerization A -> C (A,C)
Dissociation A -> C + D (A,C), (A,D)
Association A + B -> C (A,C), (B,C)
Bimolecular A + B -> C + D (A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a
simple similarity analysis by comparing the number of heavy atoms (C/O/N/S at the moment). This should
work most of the time, but a more rigorous algorithm may be needed for some cases.
generateReverseRateCoefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None)
Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the
kinetics attribute is one of several (but not necessarily all) kinetics types.
getEnthalpiesOfReaction(self, ndarray Tlist) → ndarray
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.
getEnthalpyOfReaction(self, double T ) → double
Return the enthalpy of reaction in J/mol evaluated at temperature T in K.

188 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getEntropiesOfReaction(self, ndarray Tlist) → ndarray


Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
getEntropyOfReaction(self, double T ) → double
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
getEquilibriumConstant(self, double T, str type=’Kc’) → double
Return the equilibrium constant for the reaction at the specified temperature T in K. The type parameter
lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getEquilibriumConstants(self, ndarray Tlist, str type=’Kc’) → ndarray
Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parame-
ter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getFreeEnergiesOfReaction(self, ndarray Tlist) → ndarray
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
getFreeEnergyOfReaction(self, double T ) → double
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.
getRateCoefficient(self, double T, double P=0) → double
Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa,
including any reaction path degeneracies.
If diffusionLimiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct
the rate. If not, then use the intrinsic rate coefficient.
getStoichiometricCoefficient(self, Species spec) → int
Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is
increased by one for each time spec appears as a product and decreased by one for each time spec appears
as a reactant.
getSurfaceRateCoefficient(self, double T, double surfaceSiteDensity) → double
Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site
density surfaceSiteDensity in mol/m2. Value is returned in combination of [m,mol,s]
getURL(self )
Get a URL to search for this reaction in the rmg website.
get_mean_sigma_and_epsilon(self, bool reverse=False)
Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon)
using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the
products
get_reduced_mass(self, bool reverse=False)
Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if
reverse is True
hasTemplate(self, list reactants, list products) → bool
Return True if the reaction matches the template of reactants and products, which are both lists of
Species objects, or False if not.

index
‘int’
Type index
isAssociation(self ) → bool
Return True if the reaction represents an association reaction A + B −
↽−
−⇀
− C or False if not.

1.10. Reactions (rmgpy.reaction) 189


RMG-Py API Reference, Release 2.4.1

isBalanced(self ) → bool
Return True if the reaction has the same number of each atom on each side of the reaction equation, or
False if not.

isDissociation(self ) → bool
Return True if the reaction represents a dissociation reaction A −
↽−
−⇀
− B + C or False if not.
isIsomerization(self ) → bool
−−
Return True if the reaction represents an isomerization reaction A ↽−⇀
− B or False if not.
isIsomorphic(self, Reaction other, bool eitherDirection=True, bool checkIdentical=False, bool
checkOnlyLabel=False, bool checkTemplateRxnProducts=False, bool generateIni-
tialMap=False, bool strict=True) → bool
Return True if this reaction is the same as the other reaction, or False if they are different. The compar-
ison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.
Parameters
• eitherDirection (bool, optional) – if False,then the reaction direction must
match.
• checkIdentical (bool, optional) – if True, check that atom ID’s match (used for
checking degeneracy)
• checkOnlyLabel (bool, optional) – if True, only check the string representation,
ignoring molecular structure comparisons
• checkTemplateRxnProducts (bool, optional) – if True, only check isomorphism
of reaction products (used when we know the reactants are identical, i.e. in generating
reactions)
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isSurfaceReaction(self ) → bool
Return True if one or more reactants or products are surface species (or surface sites)
isUnimolecular(self ) → bool
−−
Return True if the reaction has a single molecule as either reactant or product (or both) A ↽−⇀
− B + C or
A+B↽ −−
−⇀
− C or A ↽ −−
−⇀− B, or False if not.
is_forward
‘bool’
Type is_forward
k_effective_cache
dict
Type k_effective_cache
kinetics
rmgpy.kinetics.model.KineticsModel
Type kinetics
label
str
Type label

190 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

matchesSpecies(self, list reactants, list products=None) → bool


Compares the provided reactants and products against the reactants and products of this reaction. Both
directions are checked.
Parameters
• reactants (list) – Species required on one side of the reaction
• products (list, optional) – Species required on the other side
network_kinetics
rmgpy.kinetics.arrhenius.Arrhenius
Type network_kinetics
pairs
list
Type pairs
products
list
Type products
rank
object
Type rank
reactants
list
Type reactants
reverseThisArrheniusRate(self, Arrhenius kForward, str reverseUnits, Tmin=None, Tmax=None)
Reverses the given kForward, which must be an Arrhenius type. You must supply the correct units for the
reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
reversible
‘bool’
Type reversible
specificCollider
rmgpy.species.Species
Type specificCollider
toCantera(self, speciesList=None, useChemkinIdentifier=False)
Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self, speciesList=None, kinetics=True)
Return the chemkin-formatted string for this reaction.
If kinetics is set to True, the chemkin format kinetics will also be returned (requires the speciesList to
figure out third body colliders.) Otherwise, only the reaction string will be returned.
toLabeledStr(self, use_index=False)
the same as __str__ except that the labels are assumed to exist and used for reactant and products rather
than the labels plus the index in parentheses

1.10. Reactions (rmgpy.reaction) 191


RMG-Py API Reference, Release 2.4.1

transitionState
rmgpy.species.TransitionState
Type transitionState

1.11 Reaction mechanism generation (rmgpy.rmg)

The rmgpy.rmg subpackage contains the main functionality for using RMG-Py to automatically generate detailed
reaction mechanisms.

1.11.1 Reaction models

Class Description
Species A chemical species, with RMG-specific functionality
CoreEdgeReactionModel A reaction model comprised of core and edge species and reactions

1.11.2 Input

Function Description
readInputFile() Load an RMG job input file
saveInputFile() Save an RMG job input file

1.11.3 Output

Function Description
saveOutputHTML() Save the results of an RMG job to an HTML file
saveDiffHTML() Save a comparison of two reaction mechanisms to an HTML file

1.11.4 Job classes

Class Description
RMG Main class for RMG jobs

1.11.5 Pressure dependence

Class Description
PDepReaction A pressure-dependent “net” reaction
PDepNetwork A pressure-dependent unimolecular reaction network, with RMG-specific functionality

192 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.rmg.model.CoreEdgeReactionModel

class rmgpy.rmg.model.CoreEdgeReactionModel(core=None, edge=None, surface=None)


Represent a reaction model constructed using a rate-based screening algorithm. The species and reactions in the
model itself are called the core; the species and reactions identified as candidates for inclusion in the model are
called the edge. The attributes are:

Attribute Description
core The species and reactions of the current model core
edge The species and reactions of the current model edge
networkDict A dictionary of pressure-dependent reaction networks (Network objects) indexed by
source.
networkList A list of pressure-dependent reaction networks (Network objects)
networkCount A counter for the number of pressure-dependent networks created
indexSpecies- A dictionary with a unique index pointing to the species objects
Dict
solventName String describing solvent name for liquid reactions. Empty for non-liquid estimation
surfaceSiteDen- The surface site density (a SurfaceConcentration quantity) or None if no heterogeneous
sity catalyst.

addNewSurfaceObjects(obj, newSurfaceSpecies, newSurfaceReactions, reactionSystem)


obj is the list of objects for enlargement coming from simulate newSurfaceSpecies and newSurfaceRe-
actions are the current lists of surface species and surface reactions following simulation reactionSystem
is the current reactor manages surface species and reactions being moved to and from the surface moves
them to appropriate newSurfaceSpc/RxnsAdd/loss sets returns false if the surface has changed
addReactionLibraryToEdge(reactionLibrary)
Add all species and reactions from reactionLibrary, a KineticsPrimaryDatabase object, to the model
edge.
addReactionLibraryToOutput(reactionLib)
Add all species and reactions from reactionLibrary, a KineticsPrimaryDatabase object, to the output.
This does not bring any of the reactions or species into the core itself.
addReactionToCore(rxn)
Add a reaction rxn to the reaction model core (and remove from edge if necessary). This function assumes
rxn has already been checked to ensure it is supposed to be a core reaction (i.e. all of its reactants AND all
of its products are in the list of core species).
addReactionToEdge(rxn)
Add a reaction rxn to the reaction model edge. This function assumes rxn has already been checked to
ensure it is supposed to be an edge reaction (i.e. all of its reactants OR all of its products are in the list of
core species, and the others are in either the core or the edge).
addReactionToUnimolecularNetworks(newReaction, newSpecies, network=None)
Given a newly-created Reaction object newReaction, update the corresponding unimolecular reaction
network. If no network exists, a new one is created. If the new reaction is an isomerization that connects
two existing networks, the two networks are merged. This function is called whenever a new high-pressure
limit edge reaction is created. Returns the network containing the new reaction.
addSeedMechanismToCore(seedMechanism, react=False)
Add all species and reactions from seedMechanism, a KineticsPrimaryDatabase object, to the model
core. If react is True, then reactions will also be generated between the seed species. For large seed
mechanisms this can be prohibitively expensive, so it is not done by default.
addSpeciesToCore(spec)
Add a species spec to the reaction model core (and remove from edge if necessary). This function also

1.11. Reaction mechanism generation (rmgpy.rmg) 193


RMG-Py API Reference, Release 2.4.1

moves any reactions in the edge that gain core status as a result of this change in status to the core. If this
are any such reactions, they are returned in a list.
addSpeciesToEdge(spec)
Add a species spec to the reaction model edge.
adjustSurface()
Here we add species intended to be added and remove any species that need to be moved out of the core.
For now we remove reactions from the surface that have become part of a PDepNetwork by intersecting the
set of surface reactions with the core so that all surface reactions are in the core thus the surface algorithm
currently (June 2017) is not implemented for pdep networks (however it will function fine for non-pdep
reactions on a pdep run)
applyKineticsToReaction(reaction)
retrieve the best kinetics for the reaction and apply it towards the forward or reverse direction (if reverse,
flip the direaction).
applyThermoToSpecies(procnum)
Generate thermo for species. QM calculations are parallelized if requested.
checkForExistingReaction(rxn)
Check to see if an existing reaction has the same reactants, products, and family as rxn. Returns True or
False and the matched reaction (if found).

First, a shortlist of reaction is retrieved that have the same reaction keys as the parameter reaction.
Next, the reaction ID containing an identifier (e.g. label) of the reactants and products is compared between
the parameter reaction and the each of the reactions in the shortlist. If a match is found, the discovered
reaction is returned.
If a match is not yet found, the Library (seed mechs, reaction libs) in the reaction database are iterated over
to check if a reaction was overlooked (a reaction with a different “family” key as the parameter reaction).
checkForExistingSpecies(molecule)
Check to see if an existing species contains the same molecule.Molecule as molecule. Comparison is
done using isomorphism without consideration of electrons. Therefore, resonance structures of a species
will all match each other.
Returns the matched species if found and None otherwise.
clearSurfaceAdjustments()
empties surface tracking varaibles
enlarge(newObject=None, reactEdge=False, unimolecularReact=None, bimolecularReact=None, tri-
molecularReact=None)
Enlarge a reaction model by processing the objects in the list newObject. If newObject is a rmg.species.
Species object, then the species is moved from the edge to the core and reactions generated for that
species, reacting with itself and with all other species in the model core. If newObject is a rmg.unirxn.
network.Network object, then reactions are generated for the species in the network with the largest
leak flux.
If the reactEdge flag is True, then no newObject is needed, and instead the algorithm proceeds to react the
core species together to form edge reactions.
generateKinetics(reaction)
Generate best possible kinetics for the given reaction using the kinetics database.
generateThermo(spc, rename=False)
Generate thermo for species.
getLists()
Return lists of all of the species and reactions in the core and the edge.

194 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getModelSize()
Return the numbers of species and reactions in the model core and edge. Note that this is not necessarily
equal to the lengths of the corresponding species and reaction lists.
getStoichiometryMatrix()
Return the stoichiometry matrix for all generated species and reactions. The id of each species and reaction
is the corresponding row and column, respectively, in the matrix.
initializeIndexSpeciesDict()
Populates the core species dictionary
integer -> core Species
with the species that are currently in the core.
makeNewPDepReaction(forward)
Make a new pressure-dependent reaction based on a list of reactants and a list of products. The reaction
belongs to the specified network and has pressure-dependent kinetics given by kinetics.
No checking for existing reactions is made here. The returned PDepReaction object is not added to the
global list of reactions, as that is intended to represent only the high-pressure-limit set. The reaction-
Counter is incremented, however, since the returned reaction can and will exist in the model edge and/or
core.
makeNewReaction(forward, checkExisting=True, generateThermo=True)
Make a new reaction given a Reaction object forward. The reaction is added to the global list of reactions.
Returns the reaction in the direction that corresponds to the estimated kinetics, along with whether or not
the reaction is new to the global reaction list.
The forward direction is determined using the “is_reverse” attribute of the reaction’s family. If the reaction
family is its own reverse, then it is made such that the forward reaction is exothermic at 298K.
The forward reaction is appended to self.newReactionList if it is new.
makeNewSpecies(object, label=”, reactive=True, checkForExisting=True, generateThermo=True)
Formally create a new species from the specified object, which can be either a Molecule object or an
rmgpy.species.Species object. It is emphasized that reactive relates to the Species attribute, while
reactive_structure relates to the Molecule attribute.
markChemkinDuplicates()
Check that all reactions that will appear the chemkin output have been checked as duplicates.
Call this if you’ve done something that may have introduced undetected duplicate reactions, like add a
reaction library or seed mechanism. Anything added via the expand() method should already be detected.
printEnlargeSummary(newCoreSpecies, newCoreReactions, newEdgeSpecies, newEdgeReactions, re-
actionsMovedFromEdge=None, reactEdge=False)
Output a summary of a model enlargement step to the log. The details of the enlargement are passed in the
newCoreSpecies, newCoreReactions, newEdgeSpecies, and newEdgeReactions objects.
processNewReactions(newReactions, newSpecies, pdepNetwork=None, generateThermo=True)
Process a list of newly-generated reactions involving the new core species or explored isomer newSpecies
in network pdepNetwork.
Makes a reaction and decides where to put it: core, edge, or PDepNetwork.
prune(reactionSystems, toleranceKeepInEdge, toleranceMoveToCore, maximumEdgeSpecies, min-
SpeciesExistIterationsForPrune)
Remove species from the model edge based on the simulation results from the list of reactionSystems.
registerReaction(rxn)
Adds the reaction to the reaction database.

1.11. Reaction mechanism generation (rmgpy.rmg) 195


RMG-Py API Reference, Release 2.4.1

The reaction database is structured as a multi-level dictionary, for efficient search and retrieval of existing
reactions.
The database has two types of dictionary keys: - reaction family - reactant(s) keys
First, the keys are generated for the parameter reaction.
Next, it is checked whether the reaction database already contains similar keys. If not, a new container is
created, either a dictionary for the family key and first reactant key, or a list for the second reactant key.
Finally, the reaction is inserted as the first element in the list.
removeEmptyPdepNetworks()
searches for and deletes any empty pdep networks
removeSpeciesFromEdge(reactionSystems, spec)
Remove species spec from the reaction model edge.
retrieve(family_label, key1, key2)
Returns a list of reactions from the reaction database with the same keys as the parameters.
Returns an empty list when one of the keys could not be found.
searchRetrieveReactions(rxn)
Searches through the reaction database for reactions with an identical reaction key as the key of the pa-
rameter reaction.
Both the reaction key based on the reactants as well as on the products is used to search for possible
candidate reactions.
setThermodynamicFilteringParameters(Tmax, toleranceThermoKeepSpeciesInEdge, minCore-
SizeForPrune, maximumEdgeSpecies, reactionSystems)
sets parameters for thermodynamic filtering based on the current core Tmax is the maximum reactor tem-
perature in K toleranceThermoKeepSpeciesInEdge is the Gibbs number above which species will be fil-
tered minCoreSizeForPrune is the core size at which thermodynamic filtering will start maximumEdge-
Species is the maximum allowed number of edge species reactionSystems is a list of reactionSystem
objects
thermoFilterDown(maximumEdgeSpecies, minSpeciesExistIterationsForPrune=0)
removes species from the edge based on their Gibbs energy until maximumEdgeSpecies is reached under
the constraint that all removed species are older than minSpeciesExistIterationsForPrune iterations maxi-
mumEdgeSpecies is the maximum allowed number of edge species minSpeciesExistIterationsForPrune is
the number of iterations a species must be in the edge before it is eligible for thermo filtering
thermoFilterSpecies(spcs)
checks Gibbs energy of the species in species against the maximum allowed Gibbs energy
updateUnimolecularReactionNetworks()
Iterate through all of the currently-existing unimolecular reaction networks, updating those that have been
marked as invalid. In each update, the phenomonological rate coefficients 𝑘(𝑇, 𝑃 ) are computed for each
net reaction in the network, and the resulting reactions added or updated.
class rmgpy.rmg.model.ReactionModel(species=None, reactions=None)
Represent a generic reaction model. A reaction model consists of species, a list of species, and reactions, a list
of reactions.
merge(other)
Return a new ReactionModel object that is the union of this model and other.

196 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

RMG input files

rmgpy.rmg.input.readInputFile(path, rmg0)
Read an RMG input file at path on disk into the RMG object rmg.
rmgpy.rmg.input.saveInputFile(path, rmg)
Save an RMG input file at path on disk from the RMG object rmg.

rmgpy.rmg.main.RMG

class rmgpy.rmg.main.RMG(inputFile=None, outputDirectory=None)


A representation of a Reaction Mechanism Generator (RMG) job. The attributes are:

Attribute Description
inputFile The path to the input file
databaseDirectory The directory containing the RMG database
thermoLibraries The thermodynamics libraries to load
reactionLibraries The kinetics libraries to load
statmechLibraries The statistical mechanics libraries to load
seedMechanisms The seed mechanisms included in the model
kineticsFamilies The kinetics families to use for reaction generation
kineticsDepositories The kinetics depositories to use for looking up kinetics in each family
kineticsEstimator The method to use to estimate kinetics: ‘group additivity’ or ‘rate rules’
solvent If solvation estimates are required, the name of the solvent.
reactionModel The core-edge reaction model generated by this job
reactionSystems A list of the reaction systems used in this job
database The RMG database used in this job
modelSettingsList List of ModelSettings objects containing information related to how to manage species/reaction mov
simulatorSettingsList List of SimulatorSettings objects containing information on how to run simulations
trimolecular True to consider reactions between three species (i.e., if trimolecular reaction families are present)
unimolecularThreshold Array of flags indicating whether a species is above the unimolecular reaction threshold
bimolecularThreshold Array of flags indicating whether two species are above the bimolecular reaction threshold
trimolecularThreshold Array of flags indicating whether three species are above the trimolecular reaction threshold
unimolecularReact Array of flags indicating whether a species should react unimolecularly in the enlarge step
bimolecularReact Array of flags indicating whether two species should react in the enlarge step
trimolecularReact Array of flags indicating whether three species should react in the enlarge step
termination A list of termination targets (i.e TerminationTime and TerminationConversion objects)
speciesConstraints Dictates the maximum number of atoms, carbons, electrons, etc. generated by RMG
outputDirectory The directory used to save output files
verbosity The level of logging verbosity for console output
loadRestart True if restarting a previous job, False otherwise
saveRestartPeriod The time period to periodically save a restart file (Quantity), or None for never.
units The unit system to use to save output files (currently must be ‘si’)
generateOutputHTML True to draw pictures of the species and reactions, saving a visualized model in an output HTML fil
generatePlots True to generate plots of the job execution statistics after each iteration, False otherwise
verboseComments True to keep the verbose comments for database estimates, False otherwise
saveEdgeSpecies True to save chemkin and HTML files of the edge species, False otherwise
keepIrreversible True to keep ireversibility of library reactions as is (‘<=>’ or ‘=>’). False (default) to force all libr
trimolecularProductReversible True (default) to allow families with trimolecular products to react in the reverse direction, False o
pressureDependence Whether to process unimolecular (pressure-dependent) reaction networks
quantumMechanics Whether to apply quantum mechanical calculations instead of group additivity to certain molecular t

1.11. Reaction mechanism generation (rmgpy.rmg) 197


RMG-Py API Reference, Release 2.4.1

Table 3 – continued from previous page


Attribute Description
ml_estimator To use thermo estimation with machine learning
ml_settings Settings for ML estimation
wallTime The maximum amount of CPU time in the form DD:HH:MM:SS to expend on this job; used to stop
kineticsdatastore True if storing details of each kinetic database entry in text file, False otherwise
initializationTime The time at which the job was initiated, in seconds since the epoch (i.e. from time.time())
done Whether the job has completed (there is nothing new to add)

checkInput()
Check for a few common mistakes in the input file.
checkLibraries()
Check unwanted use of libraries: Liquid phase libraries in Gas phase simulation. Loading a Liquid phase
library obtained in another solvent than the one defined in the input file. Other checks can be added here.
check_model()
Run checks on the RMG model
clear()
Clear all loaded information about the job (except the file paths).
execute(**kwargs)
Execute an RMG job using the command-line arguments args as returned by the argparse package.
finish()
Complete the model generation.
generateCanteraFiles(chemkinFile, **kwargs)
Convert a chemkin mechanism chem.inp file to a cantera mechanism file chem.cti and save it in the cantera
directory
initialize(**kwargs)
Initialize an RMG job using the command-line arguments args as returned by the argparse package.
loadInput(path=None)
Load an RMG job from the input file located at inputFile, or from the inputFile attribute if not given as a
parameter.
loadRMGJavaInput(path)
Load an RMG-Java job from the input file located at inputFile, or from the inputFile attribute if not given
as a parameter.
loadRestartFile(path)
Load a restart file at path on disk.
loadThermoInput(path=None)
Load an Thermo Estimation job from a thermo input file located at inputFile, or from the inputFile attribute
if not given as a parameter.
logHeader(level=20)
Output a header containing identifying information about RMG to the log.
makeSeedMech(firstTime=False)
causes RMG to make a seed mechanism out of the current chem_annotated.inp and species_dictionary.txt
this seed mechanism is outputted in a seed folder within the run directory and automatically added to as
the (or replaces the current) ‘Seed’ thermo and kinetics libraries in database
if run with firstTime=True it will change self.name to be unique within the thermo/kinetics libraries by
adding integers to the end of the name to prevent overwritting

198 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

makeSpeciesLabelsIndependent(species)
This method looks at the core species labels and makes sure none of them conflict If a conflict occurs, the
second occurance will have ‘-2’ added returns a list of the old labels
processPdepNetworks(obj)
properly processes PDepNetwork objects and lists of PDepNetwork objects returned from simulate
processReactionsToSpecies(obj)
properly processes Reaction objects and lists of Reaction objects returned from simulate
processToSpeciesNetworks(obj)
breaks down the objects returned by simulate into Species and PDepNetwork components
readMeaningfulLineJava(f )
Read a meaningful line from an RMG-Java condition file object f, returning the line with any comments
removed.
register_listeners()
Attaches listener classes depending on the options found in the RMG input file.
run_model_analysis(number=10)
Run sensitivity and uncertainty analysis if requested.
run_uncertainty_analysis()
Run uncertainty analysis if proper settings are available.
saveEverything()
Saves the output HTML, the Chemkin file, and the Restart file (if appropriate).
The restart file is only saved if self.saveRestartPeriod or self.done.
saveInput(path=None)
Save an RMG job to the input file located at path, or from the outputFile attribute if not given as a param-
eter.
updateReactionThresholdAndReactFlags(rxnSysUnimolecularThreshold=None, rxnSysBimolec-
ularThreshold=None, rxnSysTrimolecularThresh-
old=None, skipUpdate=False)
updates the length and boolean value of the unimolecular and bimolecular react and threshold flags
rmgpy.rmg.main.initializeLog(verbose, log_file_name)
Set up a logger for RMG to use to print output to stdout. The verbose parameter is an integer specifying the
amount of log text seen at the console; the levels correspond to those of the logging module.
rmgpy.rmg.main.makeProfileGraph(stats_file)
Uses gprof2dot to create a graphviz dot file of the profiling information.
This requires the gprof2dot package available via pip install gprof2dot. Render the result using the program
‘dot’ via a command like dot -Tps2 input.dot -o output.ps2.
Rendering the ps2 file to pdf requires an external pdf converter ps2pdf output.ps2 which produces a out-
put.ps2.pdf file.
rmgpy.rmg.main.processProfileStats(stats_file, log_file)

Saving RMG output

rmgpy.rmg.output.saveOutputHTML(path, reactionModel, partCoreEdge=’core’)


Save the current set of species and reactions of reactionModel to an HTML file path on disk. As part of this

1.11. Reaction mechanism generation (rmgpy.rmg) 199


RMG-Py API Reference, Release 2.4.1

process, drawings of all species are created in the species folder (if they don’t already exist) using the rmgpy.
molecule.draw module. The jinja package is used to generate the HTML; if this package is not found, no
HTML will be generated (but the program will carry on).
rmgpy.rmg.output.saveDiffHTML(path, commonSpeciesList, speciesList1, speciesList2, commonReac-
tions, uniqueReactions1, uniqueReactions2)
This function outputs the species and reactions on an HTML page for the comparison of two RMG models.

rmgpy.rmg.pdep.PDepNetwork

class rmgpy.rmg.pdep.PDepNetwork(index=-1, source=None)


A representation of a partial unimolecular reaction network. Each partial network has a single source isomer
or reactant channel, and is responsible only for 𝑘(𝑇, 𝑃 ) values for net reactions with source as the reactant.
Multiple partial networks can have the same source, but networks with the same source and any explored isomers
must be combined.

Attribute Type Description


source list The isomer or reactant channel that acts as the source
explored list A list of the unimolecular isomers whose reactions have been fully explored

addPathReaction(newReaction)
Add a path reaction to the network. If the path reaction already exists, no action is taken.
applyChemicallySignificantEigenvaluesMethod(lumpingOrder=None)
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the chemically-
significant eigenvalues method. If a lumpingOrder is provided, the algorithm will attempt to lump the
configurations (given by index) in the order provided, and return a reduced set of 𝑘(𝑇, 𝑃 ) values.
applyModifiedStrongCollisionMethod(efficiencyModel=’default’)
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the modified
strong collision method.
applyReservoirStateMethod()
Compute the phenomenological rate coefficients 𝑘(𝑇, 𝑃 ) at the current conditions using the reservoir state
method.
calculateCollisionModel()
Calculate the matrix of first-order rate coefficients for collisional population transfer between grains for
each isomer, including the corresponding collision frequencies.
calculateDensitiesOfStates()
Calculate the densities of states of each configuration that has states data. The densities of states are
computed such that they can be applied to each temperature in the range of interest by interpolation.
calculateEquilibriumRatios()
Return an array containing the fraction of each isomer and reactant channel present at equilibrium, as
determined from the Gibbs free energy and using the concentration equilibrium constant 𝐾c . These values
are ratios, and the absolute magnitude is not guaranteed; however, the implementation scales the elements
of the array so that they sum to unity.
calculateMicrocanonicalRates()
Calculate and return arrays containing the microcanonical rate coefficients 𝑘(𝐸) for the isomerization,
dissociation, and association path reactions in the network.
cleanup()
Delete intermedate arrays used to compute k(T,P) values.

200 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

exploreIsomer(isomer)
Explore a previously-unexplored unimolecular isomer in this partial network using the provided core-edge
reaction model reactionModel, returning the new reactions and new species.
getAllSpecies()
Return a list of all unique species in the network, including all isomers, reactant and product channels, and
bath gas species.
getLeakBranchingRatios(T, P)
Return a dict with the unexplored isomers in the partial network as the keys and the fraction of the total
leak coefficient as the values.
getLeakCoefficient(T, P)
Return the pressure-dependent rate coefficient 𝑘(𝑇, 𝑃 ) describing the total rate of “leak” from this network.
This is defined as the sum of the 𝑘(𝑇, 𝑃 ) values for all net reactions to nonexplored unimolecular isomers.
getMaximumLeakSpecies(T, P)
Get the unexplored (unimolecular) isomer with the maximum leak flux. Note that the leak rate coefficients
vary with temperature and pressure, so you must provide these in order to get a meaningful result.
get_energy_filtered_reactions(T, tol)
Returns a list of products and isomers that are greater in Free Energy than a*R*T + Gfsource(T)
get_rate_filtered_reactions(T, P, tol)
determines the set of pathReactions that have fluxes less than tol at steady state where all A => B + C
reactions are irreversible and there is a constant flux from/to the source configuration of 1.0
initialize(Tmin, Tmax, Pmin, Pmax, maximumGrainSize=0.0, minimumGrainCount=0, activeJRo-
tor=True, activeKRotor=True, rmgmode=False)
Initialize a pressure dependence calculation by computing several quantities that are independent of the
conditions. You must specify the temperature and pressure ranges of interesting using Tmin and Tmax in
K and Pmin and Pmax in Pa. You must also specify the maximum energy grain size grainSize in J/mol
and/or the minimum number of grains grainCount.
invalidate()
Mark the network as in need of a new calculation to determine the pressure-dependent rate coefficients
label
Get the label for this network (analogous to reaction families as a reaction’s source)
mapDensitiesOfStates()
Map the overall densities of states to the current energy grains. Semi-logarithmic interpolation will be
used if the grain sizes of Elist0 and Elist do not match; this should not be a significant source of error as
long as the grain sizes are sufficiently small.
merge(other)
Merge the partial network other into this network.
printSummary(level=20)
Print a formatted list of information about the current network. Each molecular configuration - unimolec-
ular isomers, bimolecular reactant channels, and bimolecular product channels - is given along with its
energy on the potential energy surface. The path reactions connecting adjacent molecular configurations
are also given, along with their energies on the potential energy surface. The level parameter controls the
level of logging to which the summary is written, and is DEBUG by default.
remove_disconnected_reactions()
gets rid of reactions/isomers/products not connected to the source by a reaction sequence
remove_reactions(reactionModel, rxns)
removes a list of reactions from the network and all reactions/products left disconnected by removing those
reactions

1.11. Reaction mechanism generation (rmgpy.rmg) 201


RMG-Py API Reference, Release 2.4.1

selectEnergyGrains(T, grainSize=0.0, grainCount=0)


Select a suitable list of energies to use for subsequent calculations. This is done by finding the minimum
and maximum energies on the potential energy surface, then adding a multiple of 𝑘B 𝑇 onto the maximum
energy.
You must specify either the desired grain spacing grainSize in J/mol or the desired number of grains
Ngrains, as well as a temperature T in K to use for the equilibrium calculation. You can specify both
grainSize and grainCount, in which case the one that gives the more accurate result will be used (i.e. they
represent a maximum grain size and a minimum number of grains). An array containing the energy grains
in J/mol is returned.
setConditions(T, P, ymB=None)
Set the current network conditions to the temperature T in K and pressure P in Pa. All of the internal
variables are updated accordingly if they are out of date. For example, those variables that depend only on
temperature will not be recomputed if the temperature is the same.
solveFullME(tlist, x0)
Directly solve the full master equation using a stiff ODE solver. Pass the reaction network to solve, the
temperature T in K and pressure P in Pa to solve at, the energies Elist in J/mol to use, the output time points
tlist in s, the initial total populations x0, the full master equation matrix M, the accounting matrix indices
relating isomer and energy grain indices to indices of the master equation matrix, and the densities of states
densStates in mol/J of each isomer. Returns the times in s, population distributions for each isomer, and
total population profiles for each configuration.
solveReducedME(tlist, x0)
Directly solve the reduced master equation using a stiff ODE solver. Pass the output time points tlist in s
and the initial total populations x0. Be sure to run one of the methods for generating 𝑘(𝑇, 𝑃 ) values before
calling this method. Returns the times in s, population distributions for each isomer, and total population
profiles for each configuration.
solve_SS_network(T, P)
calculates the steady state concentrations if all A => B + C reactions are irreversible and the flux from/to
the source configuration is 1.0
update(reactionModel, pdepSettings)
Regenerate the 𝑘(𝑇, 𝑃 ) values for this partial network if the network is marked as invalid.
updateConfigurations(reactionModel)
Sort the reactants and products of each of the network’s path reactions into isomers, reactant channels, and
product channels. You must pass the current reactionModel because some decisions on sorting are made
based on which species are in the model core.

rmgpy.rmg.pdep.PDepReaction

class rmgpy.rmg.pdep.PDepReaction(index=-1, label=”, reactants=None, products=None, speci-


ficCollider=None, network=None, kinetics=None, net-
work_kinetics=None, reversible=True, transitionState=None,
duplicate=False, degeneracy=1, pairs=None)

allow_max_rate_violation
‘bool’
Type allow_max_rate_violation
allow_pdep_route
‘bool’
Type allow_pdep_route

202 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

calculateMicrocanonicalRateCoefficient(self, ndarray Elist, ndarray Jlist, ndarray reac-


DensStates, ndarray prodDensStates=None, double
T=0.0)
Calculate the microcanonical rate coefficient 𝑘(𝐸) for the reaction reaction at the energies Elist in J/mol.
reacDensStates and prodDensStates are the densities of states of the reactant and product configurations
for this reaction. If the reaction is irreversible, only the reactant density of states is required; if the reaction
is reversible, then both are required. This function will try to use the best method that it can based on the
input data available:
• If detailed information has been provided for the transition state (i.e. the molecular degrees of free-
dom), then RRKM theory will be used.
• If the above is not possible but high-pressure limit kinetics 𝑘∞ (𝑇 ) have been provided, then the
inverse Laplace transform method will be used.
The density of states for the product prodDensStates and the temperature of interest T in K can also
be provided. For isomerization and association reactions prodDensStates is required; for dissociation
reactions it is optional. The temperature is used if provided in the detailed balance expression to determine
the reverse kinetics, and in certain cases in the inverse Laplace transform method.
calculateTSTRateCoefficient(self, double T ) → double
Evaluate the forward rate coefficient for the reaction with corresponding transition state TS at temperature
T in K using (canonical) transition state theory. The TST equation is

𝑄‡ (𝑇 )
(︂ )︂
𝑘B 𝑇 𝐸0
𝑘(𝑇 ) = 𝜅(𝑇 ) exp −
ℎ 𝑄A (𝑇 )𝑄B (𝑇 ) 𝑘B 𝑇

where 𝑄‡ is the partition function of the transition state, 𝑄A and 𝑄B are the partition function of the
reactants, 𝐸0 is the ground-state energy difference from the transition state to the reactants, 𝑇 is the
absolute temperature, 𝑘B is the Boltzmann constant, and ℎ is the Planck constant. 𝜅(𝑇 ) is an optional
tunneling correction.
calculateTSTRateCoefficients(self, ndarray Tlist) → ndarray

calculate_coll_limit(self, float temp, bool reverse=False)


Calculate the collision limit rate for the given temperature implemented as recommended in Wang et al.
doi 10.1016/j.combustflame.2017.08.005 (Eq. 1)
canTST(self ) → bool
Return True if the necessary parameters are available for using transition state theory – or the microcanon-
ical equivalent, RRKM theory – to compute the rate coefficient for this reaction, or False otherwise.
check_collision_limit_violation(self, float t_min, float t_max, float p_min, float p_max) → list
Warn if a core reaction violates the collision limit rate in either the forward or reverse direction at the
relevant extreme T/P conditions. Assuming a monotonic behaviour of the kinetics. Returns a list with the
reaction object and the direction in which the violation was detected.
comment
str
Type comment
copy(self )
Create a deep copy of the current reaction.
degeneracy
The reaction path degeneracy for this reaction.
If the reaction has kinetics, changing the degeneracy will adjust the reaction rate by a ratio of the new
degeneracy to the old degeneracy.

1.11. Reaction mechanism generation (rmgpy.rmg) 203


RMG-Py API Reference, Release 2.4.1

draw(self, path)
Generate a pictorial representation of the chemical reaction using the draw module. Use path to specify
the file to save the generated image to; the image type is automatically determined by extension. Valid
extensions are .png, .svg, .pdf, and .ps; of these, the first is a raster format and the remainder are
vector formats.
duplicate
‘bool’
Type duplicate
elementary_high_p
‘bool’
Type elementary_high_p
ensure_species(self, bool reactant_resonance=False, bool product_resonance=False)
Ensure the reaction contains species objects in its reactant and product attributes. If the reaction is found
to hold molecule objects, it modifies the reactant, product and pairs to hold Species objects.
Generates resonance structures for Molecules if the corresponding options, reactant_resonance and/or
product_resonance, are True. Does not generate resonance for reactants or products that start as Species
objects.
fixBarrierHeight(self, bool forcePositive=False)
Turns the kinetics into Arrhenius (if they were ArrheniusEP) and ensures the activation energy is at least
the endothermicity for endothermic reactions, and is not negative only as a result of using Evans Polanyi
with an exothermic reaction. If forcePositive is True, then all reactions are forced to have a non-negative
barrier.
fixDiffusionLimitedA(self, T )
Decrease the pre-exponential factor (A) by the diffusion factor to account for the diffusion limit at the
specified temperature.
generate3dTS(self, reactants, products)
Generate the 3D structure of the transition state. Called from model.generateKinetics().
self.reactants is a list of reactants self.products is a list of products
generatePairs(self )
Generate the reactant-product pairs to use for this reaction when performing flux analysis. The exact
procedure for doing so depends on the reaction type:

Reaction type Template Resulting pairs


Isomerization A -> C (A,C)
Dissociation A -> C + D (A,C), (A,D)
Association A + B -> C (A,C), (B,C)
Bimolecular A + B -> C + D (A,C), (B,D) or (A,D), (B,C)

There are a number of ways of determining the correct pairing for bimolecular reactions. Here we try a
simple similarity analysis by comparing the number of heavy atoms (C/O/N/S at the moment). This should
work most of the time, but a more rigorous algorithm may be needed for some cases.
generateReverseRateCoefficient(self, bool network_kinetics=False, Tmin=None, Tmax=None)
Generate and return a rate coefficient model for the reverse reaction. Currently this only works if the
kinetics attribute is one of several (but not necessarily all) kinetics types.
getEnthalpiesOfReaction(self, ndarray Tlist) → ndarray
Return the enthalpies of reaction in J/mol evaluated at temperatures Tlist in K.

204 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getEnthalpyOfReaction(self, double T ) → double


Return the enthalpy of reaction in J/mol evaluated at temperature T in K.
getEntropiesOfReaction(self, ndarray Tlist) → ndarray
Return the entropies of reaction in J/mol*K evaluated at temperatures Tlist in K.
getEntropyOfReaction(self, double T ) → double
Return the entropy of reaction in J/mol*K evaluated at temperature T in K.
getEquilibriumConstant(self, double T, str type=’Kc’) → double
Return the equilibrium constant for the reaction at the specified temperature T in K. The type parameter
lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getEquilibriumConstants(self, ndarray Tlist, str type=’Kc’) → ndarray
Return the equilibrium constants for the reaction at the specified temperatures Tlist in K. The type parame-
ter lets you specify the quantities used in the equilibrium constant: Ka for activities, Kc for concentrations
(default), or Kp for pressures. Note that this function currently assumes an ideal gas mixture.
getFreeEnergiesOfReaction(self, ndarray Tlist) → ndarray
Return the Gibbs free energies of reaction in J/mol evaluated at temperatures Tlist in K.
getFreeEnergyOfReaction(self, double T ) → double
Return the Gibbs free energy of reaction in J/mol evaluated at temperature T in K.
getRateCoefficient(self, double T, double P=0) → double
Return the overall rate coefficient for the forward reaction at temperature T in K and pressure P in Pa,
including any reaction path degeneracies.
If diffusionLimiter is enabled, the reaction is in the liquid phase and we use a diffusion limitation to correct
the rate. If not, then use the intrinsic rate coefficient.
getSource()
Get the source of this PDepReaction
getStoichiometricCoefficient(self, Species spec) → int
Return the stoichiometric coefficient of species spec in the reaction. The stoichiometric coefficient is
increased by one for each time spec appears as a product and decreased by one for each time spec appears
as a reactant.
getSurfaceRateCoefficient(self, double T, double surfaceSiteDensity) → double
Return the overall surface rate coefficient for the forward reaction at temperature T in K with surface site
density surfaceSiteDensity in mol/m2. Value is returned in combination of [m,mol,s]
getURL(self )
Get a URL to search for this reaction in the rmg website.
get_mean_sigma_and_epsilon(self, bool reverse=False)
Calculates the collision diameter (sigma) using an arithmetic mean Calculates the well depth (epsilon)
using a geometric mean If reverse is False the above is calculated for the reactants, otherwise for the
products
get_reduced_mass(self, bool reverse=False)
Returns the reduced mass of the reactants if reverse is False Returns the reduced mass of the products if
reverse is True
hasTemplate(self, list reactants, list products) → bool
Return True if the reaction matches the template of reactants and products, which are both lists of
Species objects, or False if not.
index
‘int’

1.11. Reaction mechanism generation (rmgpy.rmg) 205


RMG-Py API Reference, Release 2.4.1

Type index
isAssociation(self ) → bool
Return True if the reaction represents an association reaction A + B −
↽−
−⇀
− C or False if not.
isBalanced(self ) → bool
Return True if the reaction has the same number of each atom on each side of the reaction equation, or
False if not.
isDissociation(self ) → bool
Return True if the reaction represents a dissociation reaction A −
↽−
−⇀
− B + C or False if not.
isIsomerization(self ) → bool
−−
Return True if the reaction represents an isomerization reaction A ↽−⇀
− B or False if not.
isIsomorphic(self, Reaction other, bool eitherDirection=True, bool checkIdentical=False, bool
checkOnlyLabel=False, bool checkTemplateRxnProducts=False, bool generateIni-
tialMap=False, bool strict=True) → bool
Return True if this reaction is the same as the other reaction, or False if they are different. The compar-
ison involves comparing isomorphism of reactants and products, and doesn’t use any kinetic information.
Parameters
• eitherDirection (bool, optional) – if False,then the reaction direction must
match.
• checkIdentical (bool, optional) – if True, check that atom ID’s match (used for
checking degeneracy)
• checkOnlyLabel (bool, optional) – if True, only check the string representation,
ignoring molecular structure comparisons
• checkTemplateRxnProducts (bool, optional) – if True, only check isomorphism
of reaction products (used when we know the reactants are identical, i.e. in generating
reactions)
• generateInitialMap (bool, optional) – if True, initialize map by pairing atoms
with same labels
• strict (bool, optional) – if False, perform isomorphism ignoring electrons
isSurfaceReaction(self ) → bool
Return True if one or more reactants or products are surface species (or surface sites)
isUnimolecular(self ) → bool
−−
Return True if the reaction has a single molecule as either reactant or product (or both) A ↽−⇀
− B + C or
A+B↽ −−
−⇀
− C or A ↽ −−
−⇀− B, or False if not.
is_forward
‘bool’
Type is_forward
k_effective_cache
dict
Type k_effective_cache
kinetics
rmgpy.kinetics.model.KineticsModel
Type kinetics
label
str

206 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type label
matchesSpecies(self, list reactants, list products=None) → bool
Compares the provided reactants and products against the reactants and products of this reaction. Both
directions are checked.
Parameters
• reactants (list) – Species required on one side of the reaction
• products (list, optional) – Species required on the other side
network_kinetics
rmgpy.kinetics.arrhenius.Arrhenius
Type network_kinetics
pairs
list
Type pairs
products
list
Type products
rank
object
Type rank
reactants
list
Type reactants
reverseThisArrheniusRate(self, Arrhenius kForward, str reverseUnits, Tmin=None, Tmax=None)
Reverses the given kForward, which must be an Arrhenius type. You must supply the correct units for the
reverse rate. The equilibrium constant is evaluated from the current reaction instance (self).
reversible
‘bool’
Type reversible
specificCollider
rmgpy.species.Species
Type specificCollider
toCantera(self, speciesList=None, useChemkinIdentifier=False)
Converts the RMG Reaction object to a Cantera Reaction object with the appropriate reaction class.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self, speciesList=None, kinetics=True)
Return the chemkin-formatted string for this reaction.
If kinetics is set to True, the chemkin format kinetics will also be returned (requires the speciesList to
figure out third body colliders.) Otherwise, only the reaction string will be returned.
toLabeledStr(self, use_index=False)
the same as __str__ except that the labels are assumed to exist and used for reactant and products rather
than the labels plus the index in parentheses

1.11. Reaction mechanism generation (rmgpy.rmg) 207


RMG-Py API Reference, Release 2.4.1

transitionState
rmgpy.species.TransitionState
Type transitionState

rmgpy.rmg.model.Species

class rmgpy.rmg.model.Species(index=-1, label=”, thermo=None, conformer=None, molecule=None,


transportData=None, molecularWeight=None, energyTransfer-
Model=None, reactive=True, props=None, SMILES=”, InChI=”,
aug_inchi=None, symmetryNumber=-1, creationIteration=0, explic-
itlyAllowed=False)
A chemical species, representing a local minimum on a potential energy surface. The attributes are:

Attribute Description
index A unique nonnegative integer index
label A descriptive string label
thermo The heat capacity model for the species
conformer The molecular conformer for the species
molecule A list of the Molecule objects describing the molec-
ular structure
transportData A set of transport collision parameters
molecularWeight The molecular weight of the species
energyTransferModel The collisional energy transfer model to use
reactive
True if the species participates in reaction families, False if not
Reaction libraries and seed mechanisms that
include the species are always considered
regardless of this variable

props A generic ‘properties’ dictionary to store user-


defined flags
aug_inchi Unique augmented inchi
symmetryNumber Estimated symmetry number of the species, using
the resonance hybrid
creationIteration Iteration which the species is created within the re-
action mechanism generation algorithm
explicitlyAllowed Flag to exempt species from forbidden structure
checks

InChI
InChI string representation of this species. Read-only.
SMILES
SMILES string representation of this species. Read-only.
Note that SMILES representations for different resonance structures of the same species may be different.
aug_inchi
str
Type aug_inchi
calculateCp0(self ) → double
Return the value of the heat capacity at zero temperature in J/mol*K.

208 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

calculateCpInf(self ) → double
Return the value of the heat capacity at infinite temperature in J/mol*K.
conformer
rmgpy.statmech.conformer.Conformer
Type conformer
containsSurfaceSite(self ) → bool
Return True if the species is adsorbed on a surface (or is itself a site), else False.
copy(self, bool deep=False) → Species
Create a copy of the current species. If the kw argument ‘deep’ is True, then a deep copy will be made of
the Molecule objects in self.molecule.
For other complex attributes, a deep copy will always be made.
creationIteration
‘int’
Type creationIteration
energyTransferModel
object
Type energyTransferModel
explicitlyAllowed
‘bool’
Type explicitlyAllowed
fingerprint
Fingerprint of this species, taken from molecule attribute. Read-only.
fromAdjacencyList(self, adjlist)
Load the structure of a species as a Molecule object from the given adjacency list adjlist and store it as the
first entry of a list in the molecule attribute. Does not generate resonance isomers of the loaded molecule.
fromSMILES(self, smiles)
Load the structure of a species as a Molecule object from the given SMILES string smiles and store it
as the first entry of a list in the molecule attribute. Does not generate resonance isomers of the loaded
molecule.
generateEnergyTransferModel(self )
Generate the collisional energy transfer model parameters for the species. This “algorithm” is very much
in need of improvement.
generateStatMech(self )
Generate molecular degree of freedom data for the species. You must have already provided a thermody-
namics model using e.g. generateThermoData().
generateTransportData(self )
Generate the transportData parameters for the species.
generate_aug_inchi(self )

generate_resonance_structures(self, bool keep_isomorphic=True, bool filter_structures=True)


Generate all of the resonance structures of this species. The isomers are stored as a list in the molecule
attribute. If the length of molecule is already greater than one, it is assumed that all of the resonance
structures have already been generated.
getAugmentedInChI(self )

1.11. Reaction mechanism generation (rmgpy.rmg) 209


RMG-Py API Reference, Release 2.4.1

getDensityOfStates(self, ndarray Elist) → ndarray


Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the species at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the species at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol for the species at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the species at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the partition function for the species at the specified temperature T in K.
getResonanceHybrid(self )
Returns a molecule object with bond orders that are the average of all the resonance structures.
getSumOfStates(self, ndarray Elist) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol.
getSymmetryNumber(self )
Get the symmetry number for the species, which is the highest symmetry number amongst its resonance
isomers and the resonance hybrid. This function is currently used for website purposes and testing only as
it requires additional calculateSymmetryNumber calls.
getThermoData(self, solventName=”)
Returns a thermoData object of the current Species object.
If the thermo object already exists, it is either of the (Wilhoit, ThermoData) type, or it is a Future.
If the type of the thermo attribute is Wilhoit, or ThermoData, then it is converted into a NASA format.
If it is a Future, then a blocking call is made to retrieve the NASA object. If the thermo object did not exist
yet, the thermo object is generated.
getTransportData(self )
Returns the transport data associated with this species, and calculates it if it is not yet available.
hasStatMech(self ) → bool
Return True if the species has statistical mechanical parameters, or False otherwise.
hasThermo(self ) → bool
Return True if the species has thermodynamic parameters, or False otherwise.
has_reactive_molecule(self ) → bool
True if the species has at least one reactive molecule, False otherwise
index
‘int’
Type index
isIdentical(self, other, bool strict=True) → bool
Return True if at least one molecule of the species is identical to other, which can be either a Molecule
object or a Species object.
If strict=False, performs the check ignoring electrons and resonance structures.

210 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

isIsomorphic(self, other, bool generateInitialMap=False, bool strict=True) → bool


Return True if the species is isomorphic to other, which can be either a Molecule object or a Species
object.
Parameters
• generateInitialMap (bool, optional) – If True, make initial map by matching
labeled atoms
• strict (bool, optional) – If False, perform isomorphism ignoring electrons.
isSolvent
‘bool’
Type isSolvent
isSurfaceSite(self ) → bool
Return True if the species is a vacant surface site.
is_structure_in_list(self, list species_list) → bool
Return True if at least one Molecule in self is isomorphic with at least one other Molecule in at least one
Species in species list.
label
str
Type label
molecularWeight
value_si is in kg/molecule not kg/mol)
Type The molecular weight of the species. (Note
molecule
list
Type molecule
multiplicity
Fingerprint of this species, taken from molecule attribute. Read-only.
props
dict
Type props
reactive
‘bool’
Type reactive
setE0WithThermo(self )
Helper method that sets species’ E0 using the species’ thermo data
set_structure(self, str structure)
Set self.molecule from structure which could be either a SMILES string or an adjacency list multi-line
string
symmetryNumber
‘float’
Type symmetryNumber
thermo
object

1.11. Reaction mechanism generation (rmgpy.rmg) 211


RMG-Py API Reference, Release 2.4.1

Type thermo
toAdjacencyList(self )
Return a string containing each of the molecules’ adjacency lists.
toCantera(self, useChemkinIdentifier=False)
Converts the RMG Species object to a Cantera Species object with the appropriate thermo data.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self )
Return the chemkin-formatted string for this species.
transportData
object
Type transportData

1.12 Reaction system simulation (rmgpy.solver)

The rmgpy.solver module contains classes used to represent and simulate reaction systems.

1.12.1 Reaction systems

Class Description
ReactionSystem Base class for all reaction systems
SimpleReactor A simple isothermal, isobaric, well-mixed batch reactor
LiquidReactor A homogeneous, isothermal, isobaric liquid batch reactor

1.12.2 Termination criteria

Class Description
TerminationTime Represent a time at which the simulation should be terminated
TerminationConversion Represent a species conversion at which the simulation should be terminated

rmgpy.solver.ReactionSystem

class rmgpy.solver.ReactionSystem(termination=None, sensitiveSpecies=None,


sensitivityThreshold=1e-3)
A base class for all RMG reaction systems.
Keq
numpy.ndarray
Type Keq
addReactionsToSurface(self, list newSurfaceReactions, list newSurfaceReactionInds, list surface-
Species, list surfaceReactions, list edgeSpecies)
moves new surface reactions to the surface done after the while loop before the simulate call ends

212 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

advance()
Simulate from the current value of the independent variable to a specified value tout, taking as many steps
as necessary. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt attributes.

atol_array
numpy.ndarray
Type atol_array
bimolecularThreshold
numpy.ndarray
Type bimolecularThreshold
computeRateDerivative(self )
Returns derivative vector df/dk_j where dy/dt = f(y, t, k) and k_j is the rate parameter for the jth core
reaction.
compute_network_variables(self, pdepNetworks=None)
Initialize the arrays containing network information:
• NetworkLeakCoefficients is a n x 1 array with n the number of pressure-dependent networks.
• NetworkIndices is a n x 3 matrix with n the number of pressure-dependent networks and 3 the
maximum number of molecules allowed in either the reactant or product side of a reaction.
coreReactionRates
numpy.ndarray
Type coreReactionRates
coreSpeciesConcentrations
numpy.ndarray
Type coreSpeciesConcentrations
coreSpeciesConsumptionRates
numpy.ndarray
Type coreSpeciesConsumptionRates
coreSpeciesProductionRates
numpy.ndarray
Type coreSpeciesProductionRates
coreSpeciesRates
numpy.ndarray
Type coreSpeciesRates
dydt0
numpy.ndarray
Type dydt0
edgeReactionRates
numpy.ndarray
Type edgeReactionRates
edgeSpeciesRates
numpy.ndarray
Type edgeSpeciesRates

1.12. Reaction system simulation (rmgpy.solver) 213


RMG-Py API Reference, Release 2.4.1

generate_reactant_product_indices(self, coreReactions, edgeReactions)


Creates a matrix for the reactants and products.
generate_reaction_indices(self, coreReactions, edgeReactions)
Assign an index to each reaction (core first, then edge) and store the (reaction, index) pair in a dictionary.
generate_species_indices(self, coreSpecies, edgeSpecies)
Assign an index to each species (core first, then edge) and store the (species, index) pair in a dictionary.
getLayeringIndices(self )
determines the edge reaction indices that indicate reactions that are valid for movement from edge to
surface based on the layering constraint
get_species_index(self, spc)
Retrieves the index that is associated with the parameter species from the species index dictionary.
initialize()
Initialize the DASPK solver by setting the initial values of the independent variable t0, dependent variables
y0, and first derivatives dydt0. If provided, the derivatives must be consistent with the other initial condi-
tions; if not provided, DASPK will attempt to estimate a consistent set of initial values for the derivatives.
You can also set the absolute and relative tolerances atol and rtol, respectively, either as single values for
all dependent variables or individual values for each dependent variable.
initializeModel(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions,
list surfaceSpecies=None, list surfaceReactions=None, list pdepNetworks=None,
atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-4, filterRe-
actions=False, dict conditions=None)
Initialize a simulation of the reaction system using the provided kinetic model. You will probably want to
create your own version of this method in the derived class; don’t forget to also call the base class version,
too.
initialize_solver(self )

initialize_surface(self, list coreSpecies, list coreReactions, list surfaceSpecies, list surfaceReac-


tions)
removes surfaceSpecies and surfaceReactions from until they are self consistent:
1) every reaction has one species in the surface
2) every species participates in a surface reaction
initiate_tolerances(self, atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-
4)
Computes the number of differential equations and initializes the tolerance arrays.
jacobianMatrix
numpy.ndarray
Type jacobianMatrix
kb
numpy.ndarray
Type kb
kf
numpy.ndarray
Type kf
logConversions(self, speciesIndex, y0)
Log information about the current conversion values.

214 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

logRates(self, double charRate, species, double speciesRate, double maxDifLnAccumNum, network,


double networkRate)
Log information about the current maximum species and network rates.
maxEdgeSpeciesRateRatios
numpy.ndarray
Type maxEdgeSpeciesRateRatios
maxNetworkLeakRateRatios
numpy.ndarray
Type maxNetworkLeakRateRatios
neq
‘int’
Type neq
networkIndices
numpy.ndarray
Type networkIndices
networkLeakCoefficients
numpy.ndarray
Type networkLeakCoefficients
networkLeakRates
numpy.ndarray
Type networkLeakRates
numCoreReactions
‘int’
Type numCoreReactions
numCoreSpecies
‘int’
Type numCoreSpecies
numEdgeReactions
‘int’
Type numEdgeReactions
numEdgeSpecies
‘int’
Type numEdgeSpecies
numPdepNetworks
‘int’
Type numPdepNetworks
numSurfaceReactions
‘int’
Type numSurfaceReactions
numSurfaceSpecies
‘int’

1.12. Reaction system simulation (rmgpy.solver) 215


RMG-Py API Reference, Release 2.4.1

Type numSurfaceSpecies
productIndices
numpy.ndarray
Type productIndices
prunableNetworkIndices
numpy.ndarray
Type prunableNetworkIndices
prunableNetworks
list
Type prunableNetworks
prunableSpecies
list
Type prunableSpecies
prunableSpeciesIndices
numpy.ndarray
Type prunableSpeciesIndices
reactantIndices
numpy.ndarray
Type reactantIndices
reactionIndex
dict
Type reactionIndex
reset_max_edge_species_rate_ratios(self )
This function sets maxEdgeSpeciesRateRatios back to zero for pruning of ranged reactors it is important
to avoid doing this every initialization
residual()
Evaluate the residual function for this model, given the current value of the independent variable t, depen-
dent variables y, and first derivatives dydt. Return a numpy array with the values of the residual function
and an integer with status information (0 if okay, -2 to terminate).
rtol_array
numpy.ndarray
Type rtol_array
sensitiveSpecies
list
Type sensitiveSpecies
sensitivityCoefficients
numpy.ndarray
Type sensitivityCoefficients
sensitivityThreshold
‘double’
Type sensitivityThreshold

216 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

set_initial_conditions(self )
Sets the common initial conditions of the rate equations that represent the reaction system.
• Sets the initial time of the reaction system to 0
• Initializes the species moles to a n x 1 array with zeros
set_initial_derivative(self )
Sets the derivative of the species moles with respect to the independent variable (time) equal to the residual.
set_initial_reaction_thresholds(self )

set_prunable_indices(self, edgeSpecies, pdepNetworks)

simulate(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions, list surface-
Species, list surfaceReactions, list pdepNetworks=None, bool prune=False, bool sensitiv-
ity=False, list sensWorksheet=None, modelSettings=None, simulatorSettings=None, dict con-
ditions=None)
Simulate the reaction system with the provided reaction model, consisting of lists of core species, core re-
actions, edge species, and edge reactions. As the simulation proceeds the system is monitored for validity.
If the model becomes invalid (e.g. due to an excessively large edge flux), the simulation is interrupted and
the object causing the model to be invalid is returned. If the simulation completes to the desired termination
criteria and the model remains valid throughout, None is returned.
snapshots
list
Type snapshots
speciesIndex
dict
Type speciesIndex
step()
Perform one simulation step from the current value of the independent variable toward (but not past) a
specified value tout. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt
attributes.
surfaceReactionIndices
numpy.ndarray
Type surfaceReactionIndices
surfaceSpeciesIndices
numpy.ndarray
Type surfaceSpeciesIndices
t0
‘float’
Type t0
termination
list
Type termination
trimolecular
‘bool’
Type trimolecular

1.12. Reaction system simulation (rmgpy.solver) 217


RMG-Py API Reference, Release 2.4.1

trimolecularThreshold
numpy.ndarray
Type trimolecularThreshold
unimolecularThreshold
numpy.ndarray
Type unimolecularThreshold
validLayeringIndices
numpy.ndarray
Type validLayeringIndices
y0
numpy.ndarray
Type y0

rmgpy.solver.SimpleReactor

class rmgpy.solver.SimpleReactor(T, P, initialMoleFractions, nSims=1, termination=None, sen-


sitiveSpecies=None, sensitivityThreshold=1e-3, sensCondi-
tions=None)
A reaction system consisting of a homogeneous, isothermal, isobaric batch reactor. These assumptions allow
for a number of optimizations that enable this solver to complete very rapidly, even for large kinetic models.
Keq
numpy.ndarray
Type Keq
P
rmgpy.quantity.ScalarQuantity
Type P
Prange
list
Type Prange
T
rmgpy.quantity.ScalarQuantity
Type T
Trange
list
Type Trange
V
‘double’
Type V
addReactionsToSurface(self, list newSurfaceReactions, list newSurfaceReactionInds, list surface-
Species, list surfaceReactions, list edgeSpecies)
moves new surface reactions to the surface done after the while loop before the simulate call ends

218 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

advance()
Simulate from the current value of the independent variable to a specified value tout, taking as many steps
as necessary. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt attributes.

atol_array
numpy.ndarray
Type atol_array
bimolecularThreshold
numpy.ndarray
Type bimolecularThreshold
calculate_effective_pressure(self, rxn)
Computes the effective pressure for a reaction as:
∑︁ 𝑦𝑖 * 𝑒𝑓 𝑓𝑖
𝑃𝑒𝑓 𝑓 = 𝑃 * ∑︀
𝑖 𝑗 𝑦𝑗

with:
• P the pressure of the reactor,
• y the array of initial moles of the core species
or as:
𝑃 * 𝑦𝑠𝑝𝑒𝑐𝑖𝑓 𝑖𝑐𝐶𝑜𝑙𝑙𝑖𝑑𝑒𝑟
𝑃𝑒𝑓 𝑓 = ∑︀
𝑗 𝑦𝑗

if a specificCollider is mentioned.
colliderEfficiencies
numpy.ndarray
Type colliderEfficiencies
computeRateDerivative(self )
Returns derivative vector df/dk_j where dy/dt = f(y, t, k) and k_j is the rate parameter for the jth core
reaction.
compute_network_variables(self, pdepNetworks=None)
Initialize the arrays containing network information:
• NetworkLeakCoefficients is a n x 1 array with n the number of pressure-dependent networks.
• NetworkIndices is a n x 3 matrix with n the number of pressure-dependent networks and 3 the
maximum number of molecules allowed in either the reactant or product side of a reaction.
constantVolume
‘bool’
Type constantVolume
convertInitialKeysToSpeciesObjects(self, speciesDict)
Convert the initialMoleFractions dictionary from species names into species objects, using the given dic-
tionary of species.
coreReactionRates
numpy.ndarray
Type coreReactionRates

1.12. Reaction system simulation (rmgpy.solver) 219


RMG-Py API Reference, Release 2.4.1

coreSpeciesConcentrations
numpy.ndarray
Type coreSpeciesConcentrations
coreSpeciesConsumptionRates
numpy.ndarray
Type coreSpeciesConsumptionRates
coreSpeciesProductionRates
numpy.ndarray
Type coreSpeciesProductionRates
coreSpeciesRates
numpy.ndarray
Type coreSpeciesRates
dydt0
numpy.ndarray
Type dydt0
edgeReactionRates
numpy.ndarray
Type edgeReactionRates
edgeSpeciesRates
numpy.ndarray
Type edgeSpeciesRates
generate_rate_coefficients(self, coreReactions, edgeReactions)
Populates the forward rate coefficients (kf), reverse rate coefficients (kb) and equilibrium constants (Keq)
arrays with the values computed at the temperature and (effective) pressure of the reaction system.
generate_reactant_product_indices(self, coreReactions, edgeReactions)
Creates a matrix for the reactants and products.
generate_reaction_indices(self, coreReactions, edgeReactions)
Assign an index to each reaction (core first, then edge) and store the (reaction, index) pair in a dictionary.
generate_species_indices(self, coreSpecies, edgeSpecies)
Assign an index to each species (core first, then edge) and store the (species, index) pair in a dictionary.
getLayeringIndices(self )
determines the edge reaction indices that indicate reactions that are valid for movement from edge to
surface based on the layering constraint
get_species_index(self, spc)
Retrieves the index that is associated with the parameter species from the species index dictionary.
get_threshold_rate_constants(self, modelSettings)
Get the threshold rate constants for reaction filtering.
initialMoleFractions
dict
Type initialMoleFractions
initialize()
Initialize the DASPK solver by setting the initial values of the independent variable t0, dependent variables

220 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

y0, and first derivatives dydt0. If provided, the derivatives must be consistent with the other initial condi-
tions; if not provided, DASPK will attempt to estimate a consistent set of initial values for the derivatives.
You can also set the absolute and relative tolerances atol and rtol, respectively, either as single values for
all dependent variables or individual values for each dependent variable.
initializeModel(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions,
list surfaceSpecies=None, list surfaceReactions=None, list pdepNetworks=None,
atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-4, filterRe-
actions=False, dict conditions=None)
Initialize a simulation of the simple reactor using the provided kinetic model.
initialize_solver(self )
initialize_surface(self, list coreSpecies, list coreReactions, list surfaceSpecies, list surfaceReac-
tions)
removes surfaceSpecies and surfaceReactions from until they are self consistent:
1) every reaction has one species in the surface
2) every species participates in a surface reaction
initiate_tolerances(self, atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-
4)
Computes the number of differential equations and initializes the tolerance arrays.
jacobian(self, double t, ndarray y, ndarray dydt, double cj, ndarray senpar=numpy.zeros(1,
numpy.float64))
Return the analytical Jacobian for the reaction system.
jacobianMatrix
numpy.ndarray
Type jacobianMatrix
kb
numpy.ndarray
Type kb
kf
numpy.ndarray
Type kf
logConversions(self, speciesIndex, y0)
Log information about the current conversion values.
logRates(self, double charRate, species, double speciesRate, double maxDifLnAccumNum, network,
double networkRate)
Log information about the current maximum species and network rates.
maxEdgeSpeciesRateRatios
numpy.ndarray
Type maxEdgeSpeciesRateRatios
maxNetworkLeakRateRatios
numpy.ndarray
Type maxNetworkLeakRateRatios
nSims
‘int’
Type nSims

1.12. Reaction system simulation (rmgpy.solver) 221


RMG-Py API Reference, Release 2.4.1

neq
‘int’
Type neq
networkIndices
numpy.ndarray
Type networkIndices
networkLeakCoefficients
numpy.ndarray
Type networkLeakCoefficients
networkLeakRates
numpy.ndarray
Type networkLeakRates
numCoreReactions
‘int’
Type numCoreReactions
numCoreSpecies
‘int’
Type numCoreSpecies
numEdgeReactions
‘int’
Type numEdgeReactions
numEdgeSpecies
‘int’
Type numEdgeSpecies
numPdepNetworks
‘int’
Type numPdepNetworks
numSurfaceReactions
‘int’
Type numSurfaceReactions
numSurfaceSpecies
‘int’
Type numSurfaceSpecies
pdepColliderKinetics
list
Type pdepColliderKinetics
pdepColliderReactionIndices
numpy.ndarray
Type pdepColliderReactionIndices
pdepSpecificColliderKinetics
list

222 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type pdepSpecificColliderKinetics
pdepSpecificColliderReactionIndices
numpy.ndarray
Type pdepSpecificColliderReactionIndices
productIndices
numpy.ndarray
Type productIndices
prunableNetworkIndices
numpy.ndarray
Type prunableNetworkIndices
prunableNetworks
list
Type prunableNetworks
prunableSpecies
list
Type prunableSpecies
prunableSpeciesIndices
numpy.ndarray
Type prunableSpeciesIndices
reactantIndices
numpy.ndarray
Type reactantIndices
reactionIndex
dict
Type reactionIndex
reset_max_edge_species_rate_ratios(self )
This function sets maxEdgeSpeciesRateRatios back to zero for pruning of ranged reactors it is important
to avoid doing this every initialization
residual(self, double t, ndarray y, ndarray dydt, ndarray senpar=numpy.zeros(1, numpy.float64))
Return the residual function for the governing DAE system for the simple reaction system.
rtol_array
numpy.ndarray
Type rtol_array
sensConditions
dict
Type sensConditions
sensitiveSpecies
list
Type sensitiveSpecies
sensitivityCoefficients
numpy.ndarray

1.12. Reaction system simulation (rmgpy.solver) 223


RMG-Py API Reference, Release 2.4.1

Type sensitivityCoefficients
sensitivityThreshold
‘double’
Type sensitivityThreshold
set_colliders(self, coreReactions, edgeReactions, coreSpecies)
Store collider efficiencies and reaction indices for pdep reactions that have collider efficiencies, and store
specific collider indices
set_initial_conditions(self )
Sets the initial conditions of the rate equations that represent the current reactor model.
The volume is set to the value derived from the ideal gas law, using the user-defined pressure, temperature,
and the number of moles of initial species.
The species moles array (y0) is set to the values stored in the initial mole fractions dictionary.
The initial species concentration is computed and stored in the coreSpeciesConcentrations array.
set_initial_derivative(self )
Sets the derivative of the species moles with respect to the independent variable (time) equal to the residual.
set_initial_reaction_thresholds(self )

set_prunable_indices(self, edgeSpecies, pdepNetworks)

simulate(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions, list surface-
Species, list surfaceReactions, list pdepNetworks=None, bool prune=False, bool sensitiv-
ity=False, list sensWorksheet=None, modelSettings=None, simulatorSettings=None, dict con-
ditions=None)
Simulate the reaction system with the provided reaction model, consisting of lists of core species, core re-
actions, edge species, and edge reactions. As the simulation proceeds the system is monitored for validity.
If the model becomes invalid (e.g. due to an excessively large edge flux), the simulation is interrupted and
the object causing the model to be invalid is returned. If the simulation completes to the desired termination
criteria and the model remains valid throughout, None is returned.
snapshots
list
Type snapshots
speciesIndex
dict
Type speciesIndex
specificColliderSpecies
list
Type specificColliderSpecies
step()
Perform one simulation step from the current value of the independent variable toward (but not past) a
specified value tout. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt
attributes.
surfaceReactionIndices
numpy.ndarray
Type surfaceReactionIndices
surfaceSpeciesIndices
numpy.ndarray

224 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type surfaceSpeciesIndices
t0
‘float’
Type t0
termination
list
Type termination
trimolecular
‘bool’
Type trimolecular
trimolecularThreshold
numpy.ndarray
Type trimolecularThreshold
unimolecularThreshold
numpy.ndarray
Type unimolecularThreshold
validLayeringIndices
numpy.ndarray
Type validLayeringIndices
y0
numpy.ndarray
Type y0

rmgpy.solver.LiquidReactor

class rmgpy.solver.LiquidReactor(T, initialConcentrations, nSims=1, termination=None, sen-


sitiveSpecies=None, sensitivityThreshold=1e-3, sensCondi-
tions=None, constSPCNames=None)
A reaction system consisting of a homogeneous, isothermal, constant volume batch reactor. These assumptions
allow for a number of optimizations that enable this solver to complete very rapidly, even for large kinetic
models.
Keq
numpy.ndarray
Type Keq
P
rmgpy.quantity.ScalarQuantity
Type P
T
rmgpy.quantity.ScalarQuantity
Type T
Trange
list

1.12. Reaction system simulation (rmgpy.solver) 225


RMG-Py API Reference, Release 2.4.1

Type Trange
V
‘double’
Type V
addReactionsToSurface(self, list newSurfaceReactions, list newSurfaceReactionInds, list surface-
Species, list surfaceReactions, list edgeSpecies)
moves new surface reactions to the surface done after the while loop before the simulate call ends
advance()
Simulate from the current value of the independent variable to a specified value tout, taking as many steps
as necessary. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt attributes.

atol_array
numpy.ndarray
Type atol_array
bimolecularThreshold
numpy.ndarray
Type bimolecularThreshold
computeRateDerivative(self )
Returns derivative vector df/dk_j where dy/dt = f(y, t, k) and k_j is the rate parameter for the jth core
reaction.
compute_network_variables(self, pdepNetworks=None)
Initialize the arrays containing network information:
• NetworkLeakCoefficients is a n x 1 array with n the number of pressure-dependent networks.
• NetworkIndices is a n x 3 matrix with n the number of pressure-dependent networks and 3 the
maximum number of molecules allowed in either the reactant or product side of a reaction.
constSPCIndices
list
Type constSPCIndices
constSPCNames
list
Type constSPCNames
constantVolume
‘bool’
Type constantVolume
convertInitialKeysToSpeciesObjects(self, speciesDict)
Convert the initialConcentrations dictionary from species names into species objects, using the given dic-
tionary of species.
coreReactionRates
numpy.ndarray
Type coreReactionRates
coreSpeciesConcentrations
numpy.ndarray
Type coreSpeciesConcentrations

226 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

coreSpeciesConsumptionRates
numpy.ndarray
Type coreSpeciesConsumptionRates
coreSpeciesProductionRates
numpy.ndarray
Type coreSpeciesProductionRates
coreSpeciesRates
numpy.ndarray
Type coreSpeciesRates
dydt0
numpy.ndarray
Type dydt0
edgeReactionRates
numpy.ndarray
Type edgeReactionRates
edgeSpeciesRates
numpy.ndarray
Type edgeSpeciesRates
generate_rate_coefficients(self, coreReactions, edgeReactions)
Populates the forwardRateCoefficients, reverseRateCoefficients and equilibriumConstants arrays with the
values computed at the temperature and (effective) pressure of the reacion system.
generate_reactant_product_indices(self, coreReactions, edgeReactions)
Creates a matrix for the reactants and products.
generate_reaction_indices(self, coreReactions, edgeReactions)
Assign an index to each reaction (core first, then edge) and store the (reaction, index) pair in a dictionary.
generate_species_indices(self, coreSpecies, edgeSpecies)
Assign an index to each species (core first, then edge) and store the (species, index) pair in a dictionary.
getLayeringIndices(self )
determines the edge reaction indices that indicate reactions that are valid for movement from edge to
surface based on the layering constraint
get_constSPCIndices(self, coreSpecies)
Allow to identify constant Species position in solver
get_species_index(self, spc)
Retrieves the index that is associated with the parameter species from the species index dictionary.
get_threshold_rate_constants(self, modelSettings)
Get the threshold rate constants for reaction filtering.
modelSettings is not used here, but is needed so that the method matches the one in simpleReactor.
initialConcentrations
dict
Type initialConcentrations
initialize()
Initialize the DASPK solver by setting the initial values of the independent variable t0, dependent variables

1.12. Reaction system simulation (rmgpy.solver) 227


RMG-Py API Reference, Release 2.4.1

y0, and first derivatives dydt0. If provided, the derivatives must be consistent with the other initial condi-
tions; if not provided, DASPK will attempt to estimate a consistent set of initial values for the derivatives.
You can also set the absolute and relative tolerances atol and rtol, respectively, either as single values for
all dependent variables or individual values for each dependent variable.
initializeModel(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions,
list surfaceSpecies=None, list surfaceReactions=None, list pdepNetworks=None,
atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-4, filterRe-
actions=False, dict conditions=None)
Initialize a simulation of the liquid reactor using the provided kinetic model.
initialize_solver(self )
initialize_surface(self, list coreSpecies, list coreReactions, list surfaceSpecies, list surfaceReac-
tions)
removes surfaceSpecies and surfaceReactions from until they are self consistent:
1) every reaction has one species in the surface
2) every species participates in a surface reaction
initiate_tolerances(self, atol=1e-16, rtol=1e-8, sensitivity=False, sens_atol=1e-6, sens_rtol=1e-
4)
Computes the number of differential equations and initializes the tolerance arrays.
jacobian(self, double t, ndarray y, ndarray dydt, double cj, ndarray senpar=numpy.zeros(1,
numpy.float64))
Return the analytical Jacobian for the reaction system.
jacobianMatrix
numpy.ndarray
Type jacobianMatrix
kb
numpy.ndarray
Type kb
kf
numpy.ndarray
Type kf
logConversions(self, speciesIndex, y0)
Log information about the current conversion values.
logRates(self, double charRate, species, double speciesRate, double maxDifLnAccumNum, network,
double networkRate)
Log information about the current maximum species and network rates.
maxEdgeSpeciesRateRatios
numpy.ndarray
Type maxEdgeSpeciesRateRatios
maxNetworkLeakRateRatios
numpy.ndarray
Type maxNetworkLeakRateRatios
nSims
‘int’
Type nSims

228 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

neq
‘int’
Type neq
networkIndices
numpy.ndarray
Type networkIndices
networkLeakCoefficients
numpy.ndarray
Type networkLeakCoefficients
networkLeakRates
numpy.ndarray
Type networkLeakRates
numCoreReactions
‘int’
Type numCoreReactions
numCoreSpecies
‘int’
Type numCoreSpecies
numEdgeReactions
‘int’
Type numEdgeReactions
numEdgeSpecies
‘int’
Type numEdgeSpecies
numPdepNetworks
‘int’
Type numPdepNetworks
numSurfaceReactions
‘int’
Type numSurfaceReactions
numSurfaceSpecies
‘int’
Type numSurfaceSpecies
productIndices
numpy.ndarray
Type productIndices
prunableNetworkIndices
numpy.ndarray
Type prunableNetworkIndices
prunableNetworks
list

1.12. Reaction system simulation (rmgpy.solver) 229


RMG-Py API Reference, Release 2.4.1

Type prunableNetworks
prunableSpecies
list
Type prunableSpecies
prunableSpeciesIndices
numpy.ndarray
Type prunableSpeciesIndices
reactantIndices
numpy.ndarray
Type reactantIndices
reactionIndex
dict
Type reactionIndex
reset_max_edge_species_rate_ratios(self )
This function sets maxEdgeSpeciesRateRatios back to zero for pruning of ranged reactors it is important
to avoid doing this every initialization
residual(self, double t, ndarray y, ndarray dydt, ndarray senpar=numpy.zeros(1, numpy.float64))
Return the residual function for the governing DAE system for the liquid reaction system.
rtol_array
numpy.ndarray
Type rtol_array
sensConditions
dict
Type sensConditions
sensitiveSpecies
list
Type sensitiveSpecies
sensitivityCoefficients
numpy.ndarray
Type sensitivityCoefficients
sensitivityThreshold
‘double’
Type sensitivityThreshold
set_initial_conditions(self )
Sets the initial conditions of the rate equations that represent the current reactor model.
The volume is set to the value in m3 required to contain one mole total of core species at start.
The coreSpeciesConcentrations array is set to the values stored in the initial concentrations dictionary.
The initial number of moles of a species j is computed and stored in the y0 instance attribute.
set_initial_derivative(self )
Sets the derivative of the species moles with respect to the independent variable (time) equal to the residual.
set_initial_reaction_thresholds(self )

230 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

set_prunable_indices(self, edgeSpecies, pdepNetworks)


simulate(self, list coreSpecies, list coreReactions, list edgeSpecies, list edgeReactions, list surface-
Species, list surfaceReactions, list pdepNetworks=None, bool prune=False, bool sensitiv-
ity=False, list sensWorksheet=None, modelSettings=None, simulatorSettings=None, dict con-
ditions=None)
Simulate the reaction system with the provided reaction model, consisting of lists of core species, core re-
actions, edge species, and edge reactions. As the simulation proceeds the system is monitored for validity.
If the model becomes invalid (e.g. due to an excessively large edge flux), the simulation is interrupted and
the object causing the model to be invalid is returned. If the simulation completes to the desired termination
criteria and the model remains valid throughout, None is returned.
snapshots
list
Type snapshots
speciesIndex
dict
Type speciesIndex
step()
Perform one simulation step from the current value of the independent variable toward (but not past) a
specified value tout. The resulting values of 𝑡, y, and 𝑑y
𝑑𝑡 can then be accessed via the t, y, and dydt
attributes.
surfaceReactionIndices
numpy.ndarray
Type surfaceReactionIndices
surfaceSpeciesIndices
numpy.ndarray
Type surfaceSpeciesIndices
t0
‘float’
Type t0
termination
list
Type termination
trimolecular
‘bool’
Type trimolecular
trimolecularThreshold
numpy.ndarray
Type trimolecularThreshold
unimolecularThreshold
numpy.ndarray
Type unimolecularThreshold
validLayeringIndices
numpy.ndarray

1.12. Reaction system simulation (rmgpy.solver) 231


RMG-Py API Reference, Release 2.4.1

Type validLayeringIndices
viscosity
‘double’
Type viscosity
y0
numpy.ndarray
Type y0

Termination criteria

class rmgpy.solver.TerminationTime
Represent a time at which the simulation should be terminated. This class has one attribute: the termination
time in seconds.
class rmgpy.solver.TerminationConversion
Represent a conversion at which the simulation should be terminated. This class has two attributes: the species
to monitor and the fractional conversion at which to terminate.

1.13 Species (rmgpy.species)

The rmgpy.species subpackage contains classes and functions for working with chemical species.

1.13.1 Species

Class Description
Species A chemical species

1.13.2 Transition state

Class Description
TransitionState A transition state

rmgpy.species.Species

class rmgpy.species.Species(index=-1, label=”, thermo=None, conformer=None, molecule=None,


transportData=None, molecularWeight=None, energyTransfer-
Model=None, reactive=True, props=None, SMILES=”, InChI=”,
aug_inchi=None, symmetryNumber=-1, creationIteration=0, explic-
itlyAllowed=False)
A chemical species, representing a local minimum on a potential energy surface. The attributes are:

232 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Attribute Description
index A unique nonnegative integer index
label A descriptive string label
thermo The heat capacity model for the species
conformer The molecular conformer for the species
molecule A list of the Molecule objects describing the molec-
ular structure
transportData A set of transport collision parameters
molecularWeight The molecular weight of the species
energyTransferModel The collisional energy transfer model to use
reactive
True if the species participates in reaction families, False if not
Reaction libraries and seed mechanisms that
include the species are always considered
regardless of this variable

props A generic ‘properties’ dictionary to store user-


defined flags
aug_inchi Unique augmented inchi
symmetryNumber Estimated symmetry number of the species, using
the resonance hybrid
creationIteration Iteration which the species is created within the re-
action mechanism generation algorithm
explicitlyAllowed Flag to exempt species from forbidden structure
checks

InChI
InChI string representation of this species. Read-only.
SMILES
SMILES string representation of this species. Read-only.
Note that SMILES representations for different resonance structures of the same species may be different.
aug_inchi
str
Type aug_inchi
calculateCp0(self ) → double
Return the value of the heat capacity at zero temperature in J/mol*K.
calculateCpInf(self ) → double
Return the value of the heat capacity at infinite temperature in J/mol*K.
conformer
rmgpy.statmech.conformer.Conformer
Type conformer
containsSurfaceSite(self ) → bool
Return True if the species is adsorbed on a surface (or is itself a site), else False.
copy(self, bool deep=False) → Species
Create a copy of the current species. If the kw argument ‘deep’ is True, then a deep copy will be made of
the Molecule objects in self.molecule.
For other complex attributes, a deep copy will always be made.

1.13. Species (rmgpy.species) 233


RMG-Py API Reference, Release 2.4.1

creationIteration
‘int’
Type creationIteration
energyTransferModel
object
Type energyTransferModel
explicitlyAllowed
‘bool’
Type explicitlyAllowed
fingerprint
Fingerprint of this species, taken from molecule attribute. Read-only.
fromAdjacencyList(self, adjlist)
Load the structure of a species as a Molecule object from the given adjacency list adjlist and store it as the
first entry of a list in the molecule attribute. Does not generate resonance isomers of the loaded molecule.
fromSMILES(self, smiles)
Load the structure of a species as a Molecule object from the given SMILES string smiles and store it
as the first entry of a list in the molecule attribute. Does not generate resonance isomers of the loaded
molecule.
generateEnergyTransferModel(self )
Generate the collisional energy transfer model parameters for the species. This “algorithm” is very much
in need of improvement.
generateStatMech(self )
Generate molecular degree of freedom data for the species. You must have already provided a thermody-
namics model using e.g. generateThermoData().
generateTransportData(self )
Generate the transportData parameters for the species.
generate_aug_inchi(self )

generate_resonance_structures(self, bool keep_isomorphic=True, bool filter_structures=True)


Generate all of the resonance structures of this species. The isomers are stored as a list in the molecule
attribute. If the length of molecule is already greater than one, it is assumed that all of the resonance
structures have already been generated.
getAugmentedInChI(self )

getDensityOfStates(self, ndarray Elist) → ndarray


Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the species at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the species at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol for the species at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the species at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the partition function for the species at the specified temperature T in K.

234 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getResonanceHybrid(self )
Returns a molecule object with bond orders that are the average of all the resonance structures.
getSumOfStates(self, ndarray Elist) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol.
getSymmetryNumber(self )
Get the symmetry number for the species, which is the highest symmetry number amongst its resonance
isomers and the resonance hybrid. This function is currently used for website purposes and testing only as
it requires additional calculateSymmetryNumber calls.
getThermoData(self, solventName=”)
Returns a thermoData object of the current Species object.
If the thermo object already exists, it is either of the (Wilhoit, ThermoData) type, or it is a Future.
If the type of the thermo attribute is Wilhoit, or ThermoData, then it is converted into a NASA format.
If it is a Future, then a blocking call is made to retrieve the NASA object. If the thermo object did not exist
yet, the thermo object is generated.
getTransportData(self )
Returns the transport data associated with this species, and calculates it if it is not yet available.
hasStatMech(self ) → bool
Return True if the species has statistical mechanical parameters, or False otherwise.
hasThermo(self ) → bool
Return True if the species has thermodynamic parameters, or False otherwise.
has_reactive_molecule(self ) → bool
True if the species has at least one reactive molecule, False otherwise
index
‘int’
Type index
isIdentical(self, other, bool strict=True) → bool
Return True if at least one molecule of the species is identical to other, which can be either a Molecule
object or a Species object.
If strict=False, performs the check ignoring electrons and resonance structures.
isIsomorphic(self, other, bool generateInitialMap=False, bool strict=True) → bool
Return True if the species is isomorphic to other, which can be either a Molecule object or a Species
object.
Parameters
• generateInitialMap (bool, optional) – If True, make initial map by matching
labeled atoms
• strict (bool, optional) – If False, perform isomorphism ignoring electrons.
isSolvent
‘bool’
Type isSolvent
isSurfaceSite(self ) → bool
Return True if the species is a vacant surface site.

1.13. Species (rmgpy.species) 235


RMG-Py API Reference, Release 2.4.1

is_structure_in_list(self, list species_list) → bool


Return True if at least one Molecule in self is isomorphic with at least one other Molecule in at least one
Species in species list.
label
str
Type label
molecularWeight
value_si is in kg/molecule not kg/mol)
Type The molecular weight of the species. (Note
molecule
list
Type molecule
multiplicity
Fingerprint of this species, taken from molecule attribute. Read-only.
props
dict
Type props
reactive
‘bool’
Type reactive
setE0WithThermo(self )
Helper method that sets species’ E0 using the species’ thermo data
set_structure(self, str structure)
Set self.molecule from structure which could be either a SMILES string or an adjacency list multi-line
string
symmetryNumber
‘float’
Type symmetryNumber
thermo
object
Type thermo
toAdjacencyList(self )
Return a string containing each of the molecules’ adjacency lists.
toCantera(self, useChemkinIdentifier=False)
Converts the RMG Species object to a Cantera Species object with the appropriate thermo data.
If useChemkinIdentifier is set to False, the species label is used instead. Be sure that species’ labels are
unique when setting it False.
toChemkin(self )
Return the chemkin-formatted string for this species.
transportData
object
Type transportData

236 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

rmgpy.species.TransitionState

class rmgpy.species.TransitionState(label=”, conformer=None, frequency=None, tunnel-


ing=None, degeneracy=1)
A chemical transition state, representing a first-order saddle point on a potential energy surface. The attributes
are:

Attribute TDescription
label A descriptive string label
conformer The molecular degrees of freedom model for the species
frequency The negative frequency of the first-order saddle point
tunneling The type of tunneling model to use for tunneling through the reaction barrier
degeneracy The reaction path degeneracy

calculateTunnelingFactor(self, double T ) → double


Calculate and return the value of the canonical tunneling correction factor for the reaction at the given
temperature T in K.
calculateTunnelingFunction(self, ndarray Elist) → ndarray
Calculate and return the value of the microcanonical tunneling correction for the reaction at the given
energies Elist in J/mol.
conformer
rmgpy.statmech.conformer.Conformer
Type conformer
degeneracy
‘int’
Type degeneracy
frequency
The negative frequency of the first-order saddle point.
getDensityOfStates(self, ndarray Elist) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the transition state at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the transition state at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol for the transition state at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the transition state at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the partition function for the transition state at the specified temperature T in K.
getSumOfStates(self, ndarray Elist) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol.
label
str
Type label

1.13. Species (rmgpy.species) 237


RMG-Py API Reference, Release 2.4.1

tunneling
rmgpy.kinetics.model.TunnelingModel
Type tunneling

1.14 Statistical mechanics (rmgpy.statmech)

The rmgpy.statmech subpackage contains classes that represent various statistical mechanical models of molecular
degrees of freedom. These models enable the computation of macroscopic parameters (e.g. thermodynamics, kinetics,
etc.) from microscopic parameters.
A molecular system consisting of 𝑁 atoms is described by 3𝑁 molecular degrees of freedom. Three of these modes
involve translation of the system as a whole. Another three of these modes involve rotation of the system as a whole,
unless the system is linear (e.g. diatomics), for which there are only two rotational modes. The remaining 3𝑁 − 6
(or 3𝑁 − 5 if linear) modes involve internal motion of the atoms within the system. Many of these modes are well-
described as harmonic oscillations, while others are better modeled as torsional rotations around a bond within the
system.
Molecular degrees of freedom are mathematically represented using the Schrodinger equation 𝐻Ψ ˆ = 𝐸Ψ. By solving
the Schrodinger equation, we can determine the available energy states of the molecular system, which enables com-
putation of macroscopic parameters. Depending on the temperature of interest, some modes (e.g. vibrations) require
a quantum mechanical treatment, while others (e.g. translation, rotation) can be described using a classical solution.

1.14.1 Translational degrees of freedom

Class Description
IdealGasTranslation A model of three-dimensional translation of an ideal gas

1.14.2 Rotational degrees of freedom

Class Description
LinearRotor A model of two-dimensional rigid rotation of a linear molecule
NonlinearRotor A model of three-dimensional rigid rotation of a nonlinear molecule
KRotor A model of one-dimensional rigid rotation of a K-rotor
SphericalTopRotor A model of three-dimensional rigid rotation of a spherical top molecule

1.14.3 Vibrational degrees of freedom

Class Description
HarmonicOscillator A model of a set of one-dimensional harmonic oscillators

1.14.4 Torsional degrees of freedom

Class Description
HinderedRotor A model of a one-dimensional hindered rotation

238 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.14.5 The Schrodinger equation

Class Description
getPartitionFunction()
Calculate the partition function at a given temperature from energy levels and degen-
eracies
getHeatCapacity() Calculate the dimensionless heat capacity at a given temperature from energy levels
and degeneracies
getEnthalpy() Calculate the enthalpy at a given temperature from energy levels and degeneracies
getEntropy() Calculate the entropy at a given temperature from energy levels and degeneracies
getSumOfStates() Calculate the sum of states for a given energy domain from energy levels and degen-
eracies
getDensityOfStates() Calculate the density of states for a given energy domain from energy levels and de-
generacies

1.14.6 Convolution

Class Description
convolve() Return the convolution of two arrays
convolveBS() Convolve a degree of freedom into a density or sum of states using the Beyer-Swinehart (BS) direct
count algorithm
convolveBSSR()
Convolve a degree of freedom into a density or sum of states using the Beyer-Swinehart-Stein-
Rabinovitch (BSSR) direct count algorithm

1.14.7 Molecular conformers

Class Description
Conformer A model of a molecular conformation

Translational degrees of freedom

class rmgpy.statmech.IdealGasTranslation(mass=None, quantum=False)


A statistical mechanical model of translation in an 3-dimensional infinite square well by an ideal gas. The
attributes are:

Attribute Description
mass The mass of the translating object
quantum True to use the quantum mechanical model, False to use the classical model

Translational energies are much smaller than 𝑘B 𝑇 except for temperatures approaching absolute zero, so a
classical treatment of translation is more than adequate.
The translation of an ideal gas – a gas composed of randomly-moving, noninteracting particles of negligible
size – in three dimensions can be modeled using the particle-in-a-box model. In this model, a gas particle is
confined to a three-dimensional box of size 𝐿𝑥 𝐿𝑦 𝐿𝑧 = 𝑉 with the following potential:
{︃
0 0 ≤ 𝑥 ≤ 𝐿𝑥 , 0 ≤ 𝑦 ≤ 𝐿𝑦 , 0 ≤ 𝑧 ≤ 𝐿𝑧
𝑉 (𝑥, 𝑦, 𝑧) =
∞ otherwise

1.14. Statistical mechanics (rmgpy.statmech) 239


RMG-Py API Reference, Release 2.4.1

The time-independent Schrodinger equation for this system (within the box) is given by

~2
(︂ 2
𝜕2 𝜕2
)︂
𝜕
− + 2 + 2 Ψ(𝑥, 𝑦, 𝑧) = 𝐸Ψ(𝑥, 𝑦, 𝑧)
2𝑀 𝜕𝑥2 𝜕𝑦 𝜕𝑧

where 𝑀 is the total mass of the particle. Because the box is finite in all dimensions, the solution of the above
is quantized with the following energy levels:
[︃(︂ )︂2 (︂ )︂2 (︂ )︂2 ]︃
~2 𝑛𝑥 𝜋 𝑛𝑦 𝜋 𝑛𝑧 𝜋
𝐸𝑛𝑥 ,𝑛𝑦 ,𝑛𝑧 = + + 𝑛𝑥 , 𝑛𝑦 , 𝑛𝑧 = 1, 2, . . .
2𝑀 𝐿𝑥 𝐿𝑦 𝐿𝑧

Above we have introduced 𝑛𝑥 , 𝑛𝑦 , and 𝑛𝑧 as quantum numbers. The quantum mechanical partition function is
obtained by summing over the above energy levels:
∞ ∑︁
∞ ∑︁
∞ (︂ )︂
∑︁ 𝐸𝑛 ,𝑛 ,𝑛
𝑄trans (𝑇 ) = exp − 𝑥 𝑦 𝑧
𝑛𝑥 =1 𝑛𝑦 =1 𝑛𝑧 =1
𝑘B 𝑇

In almost all cases the temperature of interest is large relative to the energy spacing; in this limit we can obtain
a closed-form analytical expression for the translational partition function in the classical limit:
(︂ )︂3/2
2𝜋𝑀 𝑘B 𝑇
𝑄cl
trans (𝑇 ) = 𝑉
ℎ2

For a constant-pressure problem we can use the ideal gas law to replace 𝑉 with 𝑘B 𝑇 /𝑃 . This gives the partition
function a temperature dependence of 𝑇 5/2 .
as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves

240 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Returns None
mass
The mass of the translating object.
quantum
‘bool’
Type quantum

rmgpy.statmech.LinearRotor

class rmgpy.statmech.LinearRotor(inertia=None, symmetry=1, quantum=False, rotationalCon-


stant=None)
A statistical mechanical model of a two-dimensional (linear) rigid rotor. The attributes are:

Attribute Description
inertia The moment of inertia of the rotor
rotationalConstant The rotational constant of the rotor
symmetry The symmetry number of the rotor
quantum True to use the quantum mechanical model, False to use the classical model

Note that the moment of inertia and the rotational constant are simply two ways of representing the same
quantity; only one of these can be specified independently.
In the majority of chemical applications, the energies involved in the rigid rotor place it very nearly in the
classical limit at all relevant temperatures; therefore, the classical model is used by default.
A linear rigid rotor is modeled as a pair of point masses 𝑚1 and 𝑚2 separated by a distance 𝑅. Since we
are modeling the rotation of this system, we choose to work in spherical coordinates. Following the physics
convention – where 0 ≤ 𝜃 ≤ 𝜋 is the zenith angle and 0 ≤ 𝜑 ≤ 2𝜋 is the azimuth – the Schrodinger equation
for the rotor is given by
~2 1 𝜕2
[︂ (︂ )︂ ]︂
1 𝜕 𝜕
− sin 𝜃 + Ψ(𝜃, 𝜑) = 𝐸Ψ(𝜃, 𝜑)
2𝐼 sin 𝜃 𝜕𝜃 𝜕𝜃 sin2 𝜃 𝜕𝜑2
where 𝐼 ≡ 𝜇𝑅2 is the moment of inertia of the rotating body, and 𝜇 ≡ 𝑚1 𝑚2 /(𝑚1 + 𝑚2 ) is the reduced mass.
Note that there is no potential term in the above expression; for this reason, a rigid rotor is often referred to as a
free rotor. Solving the Schrodinger equation gives the energy levels 𝐸𝐽 and corresponding degeneracies 𝑔𝐽 for
the linear rigid rotor as
𝐸𝐽 = 𝐵𝐽(𝐽 + 1) 𝐽 = 0, 1, 2, . . .
𝑔𝐽 = 2𝐽 + 1
where 𝐽 is the quantum number for the rotor – sometimes called the total angular momentum quantum number
– and 𝐵 ≡ ~2 /2𝐼 is the rotational constant.
Using these expressions for the energy levels and corresponding degeneracies, we can evaluate the partition
function for the linear rigid rotor:

1 ∑︁
𝑄rot (𝑇 ) = (2𝐽 + 1)𝑒−𝐵𝐽(𝐽+1)/𝑘B 𝑇
𝜎
𝐽=0

In many cases the temperature of interest is large relative to the energy spacing; in this limit we can obtain a
closed-form analytical expression for the linear rotor partition function in the classical limit:
1 8𝜋 2 𝐼𝑘B 𝑇
𝑄cl
rot (𝑇 ) =
𝜎 ℎ2
Above we have also introduced 𝜎 as the symmetry number of the rigid rotor.

1.14. Statistical mechanics (rmgpy.statmech) 241


RMG-Py API Reference, Release 2.4.1

as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getLevelDegeneracy(self, int J ) → int
Return the degeneracy of level J.
getLevelEnergy(self, int J ) → double
Return the energy of level J in kJ/mol.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
inertia
The moment of inertia of the rotor.
make_object(self, data, class_dict)

quantum
‘bool’
Type quantum
rotationalConstant
The rotational constant of the rotor.
symmetry
‘int’
Type symmetry

rmgpy.statmech.NonlinearRotor

class rmgpy.statmech.NonlinearRotor(inertia=None, symmetry=1, quantum=False, rotationalCon-


stant=None)
A statistical mechanical model of an N-dimensional nonlinear rigid rotor. The attributes are:

Attribute Description
inertia The moments of inertia of the rotor
rotationalConstant The rotational constants of the rotor
symmetry The symmetry number of the rotor
quantum True to use the quantum mechanical model, False to use the classical model

242 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Note that the moments of inertia and the rotational constants are simply two ways of representing the same
quantity; only one set of these can be specified independently.
In the majority of chemical applications, the energies involved in the rigid rotor place it very nearly in the
classical limit at all relevant temperatures; therefore, the classical model is used by default. In the current
implementation, the quantum mechanical model has not been implemented, and a NotImplementedError
will be raised if you try to use it.
A nonlinear rigid rotor is the generalization of the linear rotor to a nonlinear polyatomic system. Such a system
is characterized by three moments of inertia 𝐼A , 𝐼B , and 𝐼C instead of just one. The solution to the Schrodinger
equation for the quantum nonlinear rotor is not well defined, so we will simply show the classical result instead:
)︂3/2 √︀
𝜋 1/2
(︂
8𝑘B 𝑇
𝑄cl
rot (𝑇 ) = 𝐼A 𝐼B 𝐼C
𝜎 ℎ2

as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
inertia
The moments of inertia of the rotor.
make_object(self, data, class_dict)

quantum
‘bool’
Type quantum
rotationalConstant
The rotational constant of the rotor.
symmetry
‘int’
Type symmetry

1.14. Statistical mechanics (rmgpy.statmech) 243


RMG-Py API Reference, Release 2.4.1

rmgpy.statmech.KRotor

class rmgpy.statmech.KRotor(inertia=None, symmetry=1, quantum=False, rotationalConstant=None)


A statistical mechanical model of an active K-rotor (a one-dimensional rigid rotor). The attributes are:

Attribute Description
inertia The moment of inertia of the rotor in amu*angstrom^2
rotationalConstant The rotational constant of the rotor in cm^-1
symmetry The symmetry number of the rotor
quantum True to use the quantum mechanical model, False to use the classical model

Note that the moment of inertia and the rotational constant are simply two ways of representing the same
quantity; only one of these can be specified independently.
In the majority of chemical applications, the energies involved in the K-rotor place it very nearly in the classical
limit at all relevant temperatures; therefore, the classical model is used by default.
The energy levels 𝐸𝐾 of the K-rotor are given by

𝐸𝐾 = 𝐵𝐾 2 𝐾 = 0, ±1, ±2, . . .

where 𝐾 is the quantum number for the rotor and 𝐵 ≡ ~2 /2𝐼 is the rotational constant.
Using these expressions for the energy levels and corresponding degeneracies, we can evaluate the partition
function for the K-rotor:

(︃ )︃
1 ∑︁
−𝐵𝐾 2 /𝑘B 𝑇
𝑄rot (𝑇 ) = 1+ 2𝑒
𝜎
𝐾=1

In many cases the temperature of interest is large relative to the energy spacing; in this limit we can obtain a
closed-form analytical expression for the linear rotor partition function in the classical limit:
)︂1/2
8𝜋 2 𝐼𝑘B 𝑇
(︂
1
𝑄cl
rot (𝑇 ) =
𝜎 ℎ2

where 𝜎 is the symmetry number of the K-rotor.


as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getLevelDegeneracy(self, int J ) → int
Return the degeneracy of level J.

244 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

getLevelEnergy(self, int J ) → double


Return the energy of level J in kJ/mol.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
inertia
The moment of inertia of the rotor.
make_object(self, data, class_dict)
quantum
‘bool’
Type quantum
rotationalConstant
The rotational constant of the rotor.
symmetry
‘int’
Type symmetry

rmgpy.statmech.SphericalTopRotor

class rmgpy.statmech.SphericalTopRotor(inertia=None, symmetry=1, quantum=False, rotational-


Constant=None)
A statistical mechanical model of a three-dimensional rigid rotor with a single rotational constant: a spherical
top. The attributes are:

Attribute Description
inertia The moment of inertia of the rotor
rotationalConstant The rotational constant of the rotor
symmetry The symmetry number of the rotor
quantum True to use the quantum mechanical model, False to use the classical model

Note that the moment of inertia and the rotational constant are simply two ways of representing the same
quantity; only one of these can be specified independently.
In the majority of chemical applications, the energies involved in the rigid rotor place it very nearly in the
classical limit at all relevant temperatures; therefore, the classical model is used by default.
A spherical top rotor is simply the three-dimensional equivalent of a linear rigid rotor. Unlike the nonlinear
rotor, all three moments of inertia of a spherical top are equal, i.e. 𝐼A = 𝐼B = 𝐼C = 𝐼. The energy levels 𝐸𝐽
and corresponding degeneracies 𝑔𝐽 of the spherial top rotor are given by

𝐸𝐽 = 𝐵𝐽(𝐽 + 1) 𝐽 = 0, 1, 2, . . .
2
𝑔𝐽 = (2𝐽 + 1)

where 𝐽 is the quantum number for the rotor and 𝐵 ≡ ~2 /2𝐼 is the rotational constant.

1.14. Statistical mechanics (rmgpy.statmech) 245


RMG-Py API Reference, Release 2.4.1

Using these expressions for the energy levels and corresponding degeneracies, we can evaluate the partition
function for the spherical top rotor:

1 ∑︁
𝑄rot (𝑇 ) = (2𝐽 + 1)2 𝑒−𝐵𝐽(𝐽+1)/𝑘B 𝑇
𝜎
𝐽=0

In many cases the temperature of interest is large relative to the energy spacing; in this limit we can obtain a
closed-form analytical expression for the linear rotor partition function in the classical limit:
)︂3/2
8𝜋 2 𝐼𝑘B 𝑇
(︂
1
𝑄cl
rot (𝑇 ) =
𝜎 ℎ2

where 𝜎 is the symmetry number of the spherical top. Note that the above differs from the nonlinear rotor
partition function by a factor of 𝜋.
as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getLevelDegeneracy(self, int J ) → int
Return the degeneracy of level J.
getLevelEnergy(self, int J ) → double
Return the energy of level J in kJ/mol.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
inertia
The moment of inertia of the rotor.
make_object(self, data, class_dict)
quantum
‘bool’
Type quantum
rotationalConstant
The rotational constant of the rotor.
symmetry
‘int’

246 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type symmetry

rmgpy.statmech.HarmonicOscillator

class rmgpy.statmech.HarmonicOscillator(frequencies=None, quantum=True)


A statistical mechanical model of a set of one-dimensional independent harmonic oscillators. The attributes are:

Attribute Description
frequencies The vibrational frequencies of the oscillators
quantum True to use the quantum mechanical model, False to use the classical model

In the majority of chemical applications, the energy levels of the harmonic oscillator are of similar magnitude to
𝑘B 𝑇 , requiring a quantum mechanical treatment. Fortunately, the harmonic oscillator has an analytical quantum
mechanical solution.
Many vibrational motions are well-described as one-dimensional quantum harmonic oscillators. The time-
independent Schrodinger equation for such an oscillator is given by

~2 𝜕 2 1
− 2
Ψ(𝑥) + 𝑚𝜔 2 𝑥2 Ψ(𝑥) = 𝐸Ψ(𝑥)
2𝑚 𝜕𝑥 2
where 𝑚 is the total mass of the particle. The harmonic potential results in quantized solutions to the above with
the following energy levels:
(︂ )︂
1
𝐸𝑛 = 𝑛 + ~𝜔 𝑛 = 0, 1, 2, . . .
2
Above we have introduced 𝑛 as the quantum number. Note that, even in the ground state (𝑛 = 0), the harmonic
oscillator has an energy that is not zero; this energy is called the zero-point energy.
The harmonic oscillator partition function is obtained by summing over the above energy levels:

(︃ (︀ )︀ )︃
∑︁ 𝑛 + 21 ~𝜔
𝑄vib (𝑇 ) = exp −
𝑛=0
𝑘B 𝑇

This summation can be evaluated explicitly to give a closed-form analytical expression for the vibrational parti-
tion function of a quantum harmonic oscillator:

𝑒−~𝜔/2𝑘B 𝑇
𝑄vib (𝑇 ) =
1 − 𝑒−~𝜔/𝑘B 𝑇
In RMG the convention is to place the zero-point energy in with the ground-state energy of the system instead
of the numerator of the vibrational partition function, which gives
1
𝑄vib (𝑇 ) =
1 − 𝑒−~𝜔/𝑘B 𝑇
The energy levels of the harmonic oscillator in chemical systems are often significant compared to the tem-
perature of interest, so we usually use the quantum result. However, the classical limit is provided here for
completeness:
𝑘B 𝑇
𝑄cl
vib (𝑇 ) =
~𝜔

as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files

1.14. Statistical mechanics (rmgpy.statmech) 247


RMG-Py API Reference, Release 2.4.1

Returns A dictionary representation of the object


Return type dict
frequencies
The vibrational frequencies of the oscillators.
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
quantum
‘bool’
Type quantum

Torsional degrees of freedom

class rmgpy.statmech.HinderedRotor(inertia=None, symmetry=1, barrier=None, fourier=None, ro-


tationalConstant=None, quantum=False, semiclassical=True,
frequency=None)
A statistical mechanical model of a one-dimensional hindered rotor. The attributes are:

Attribute Description
inertia The moment of inertia of the rotor
rotationalConstant The rotational constant of the rotor
symmetry The symmetry number of the rotor
fourier The 2𝑥𝑁 array of Fourier series coefficients
barrier The barrier height of the cosine potential
quantum True to use the quantum mechanical model, False to use the classical model
semiclassical True to use the semiclassical correction, False otherwise

248 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Note that the moment of inertia and the rotational constant are simply two ways of representing the same
quantity; only one of these can be specified independently.
The Schrodinger equation for a one-dimensional hindered rotor is given by

~2 𝑑 2
− Ψ(𝜑) + 𝑉 (𝜑)Ψ(𝜑) = 𝐸Ψ(𝜑)
2𝐼 𝑑𝜑2

where 𝐼 is the reduced moment of inertia of the torsion and 𝑉 (𝜑) describes the potential of the torsion. There
are two common forms for the potential: a simple cosine of the form
1
𝑉 (𝜑) = 𝑉0 (1 − cos 𝜎𝜑)
2
where 𝑉0 is the barrier height and 𝜎 is the symmetry number, or a more general Fourier series of the form
𝐶
∑︁
𝑉 (𝜑) = 𝐴 + (𝑎𝑘 cos 𝑘𝜑 + 𝑏𝑘 sin 𝑘𝜑)
𝑘=1

where 𝐴, 𝑎𝑘 and 𝑏𝑘 are fitted coefficients. Both potentials are typically defined such that the minimum of the
potential is zero and is found at 𝜑 = 0.
For either the cosine or Fourier series potentials, the energy levels of the quantum hindered rotor must be
determined numerically. The cosine potential does permit a closed-form representation of the classical partition
function, however:
(︂ )︂1/2 (︂ )︂ (︂ )︂
2𝜋𝐼𝑘B 𝑇 2𝜋 𝑉0 𝑉0
𝑄cl
hind (𝑇 ) = exp − 𝐼0
ℎ2 𝜎 2𝑘B 𝑇 2𝑘B 𝑇

A semiclassical correction to the above is usually required to provide a reasonable estiamate of the partition
function:

𝑄quant
vib (𝑇 ) cl
𝑄semi
hind (𝑇 ) = 𝑄hind (𝑇 )
𝑄cl
vib (𝑇 )
(︂ )︂1/2 (︂ )︂ (︂ )︂
ℎ𝜈 1 2𝜋𝐼𝑘B 𝑇 2𝜋 𝑉0 𝑉0
= exp − 𝐼0
𝑘B 𝑇 1 − exp (−ℎ𝜈/𝑘B 𝑇 ) ℎ2 𝜎 2𝑘B 𝑇 2𝑘B 𝑇

Above we have defined 𝜈 as the vibrational frequency of the hindered rotor:


√︂
𝜎 𝑉0
𝜈≡
2𝜋 2𝐼

as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
barrier
The barrier height of the cosine potential.
energies
numpy.ndarray
Type energies

1.14. Statistical mechanics (rmgpy.statmech) 249


RMG-Py API Reference, Release 2.4.1

fitCosinePotentialToData(self, ndarray angle, ndarray V )


Fit the given angles in radians and corresponding potential energies in J/mol to the cosine potential. For
best results, the angle should begin at zero and end at 2𝜋, with the minimum energy conformation having
a potential of zero be placed at zero angle. The fit is attempted at several possible values of the symmetry
number in order to determine which one is correct.
fitFourierPotentialToData(self, ndarray angle, ndarray V )
Fit the given angles in radians and corresponding potential energies in J/mol to the Fourier series potential.
For best results, the angle should begin at zero and end at 2𝜋, with the minimum energy conformation
having a potential of zero be placed at zero angle.
fourier
The 2𝑥𝑁 array of Fourier series coefficients.
frequency
‘double’
Type frequency
getDensityOfStates(self, ndarray Elist, ndarray densStates0=None) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist in J/mol above the ground state. If an
initial density of states densStates0 is given, the rotor density of states will be convoluted into these states.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
getFrequency(self ) → double
Return the frequency of vibration in cm^-1 corresponding to the limit of harmonic oscillation.
getHamiltonian(self, int Nbasis) → ndarray
Return the to the Hamiltonian matrix for the hindered rotor for the given number of basis functions Nbasis.
The Hamiltonian matrix is returned in banded lower triangular form and with units of J/mol.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
getLevelDegeneracy(self, int J ) → int
Return the degeneracy of level J.
getLevelEnergy(self, int J ) → double
Return the energy of level J in J.
getPartitionFunction(self, double T ) → double
Return the value of the partition function 𝑄(𝑇 ) at the specified temperature T in K.
getPotential(self, double phi) → double
Return the value of the hindered rotor potential 𝑉 (𝜑) in J/mol at the angle phi in radians.
getSumOfStates(self, ndarray Elist, ndarray sumStates0=None) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in J/mol above the ground state. If an initial
sum of states sumStates0 is given, the rotor sum of states will be convoluted into these states.
inertia
The moment of inertia of the rotor.
make_object(self, data, class_dict)
quantum
‘bool’

250 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type quantum
rotationalConstant
The rotational constant of the rotor.
semiclassical
‘bool’
Type semiclassical
solveSchrodingerEquation(self, int Nbasis=401) → ndarray
Solves the one-dimensional time-independent Schrodinger equation to determine the energy levels of a
one-dimensional hindered rotor with a Fourier series potential using Nbasis basis functions. For the pur-
poses of this function it is usually sufficient to use 401 basis functions (the default). Returns the energy
eigenvalues of the Hamiltonian matrix in J/mol.
symmetry
‘int’
Type symmetry

rmgpy.statmech.schrodinger

The rmgpy.statmech.schrodinger module contains functionality for working with the Schrodinger equation and
its solution. In particular, it contains functions for using the energy levels and corresponding degeneracies obtained
from solving the Schrodinger equation to compute various thermodynamic and statistical mechanical properties, such
as heat capacity, enthalpy, entropy, partition function, and the sum and density of states.
rmgpy.statmech.schrodinger.convolve(ndarray rho1, ndarray rho2)
Return the convolution of two arrays rho1 and rho2.
rmgpy.statmech.schrodinger.convolveBS(ndarray Elist, ndarray rho0, double energy, int degener-
acy=1)
Convolve a molecular degree of freedom into a density or sum of states using the Beyer-Swinehart (BS) direct
count algorithm. This algorithm is suitable for unevenly-spaced energy levels in the array of energy grains Elist
(in J/mol), but assumes the solution of the Schrodinger equation gives evenly-spaced energy levels with spacing
energy in kJ/mol and degeneracy degeneracy.
rmgpy.statmech.schrodinger.convolveBSSR(ndarray Elist, ndarray rho0, energy, degener-
acy=unitDegeneracy, int n0=0)
Convolve a molecular degree of freedom into a density or sum of states using the Beyer-Swinehart-Stein-
Rabinovitch (BSSR) direct count algorithm. This algorithm is suitable for unevenly-spaced energy levels in both
the array of energy grains Elist (in J/mol) and the energy levels corresponding to the solution of the Schrodinger
equation.
rmgpy.statmech.schrodinger.getDensityOfStates(ndarray Elist, energy, degener-
acy=unitDegeneracy, int n0=0, ndarray
densStates0=None) → ndarray
Return the values of the dimensionless density of states 𝜌(𝐸) 𝑑𝐸 for a given set of energies Elist in J/mol above
the ground state using an initial density of states densStates0. The solution to the Schrodinger equation is given
using functions energy and degeneracy that accept as argument a quantum number and return the corresponding
energy in J/mol and degeneracy of that level. The quantum number always begins at n0 and increases by ones.
rmgpy.statmech.schrodinger.getEnthalpy(double T, energy, degeneracy=unitDegeneracy, int n0=0,
int nmax=10000, double tol=1e-12) → double
Return the value of the dimensionless enthalpy 𝐻(𝑇 )/𝑅𝑇 at a given temperature T in K. The solution to the
Schrodinger equation is given using functions energy and degeneracy that accept as argument a quantum number
and return the corresponding energy in J/mol and degeneracy of that level. The quantum number always begins

1.14. Statistical mechanics (rmgpy.statmech) 251


RMG-Py API Reference, Release 2.4.1

at n0 and increases by ones. You can also change the relative tolerance tol and the maximum allowed value of
the quantum number nmax.
rmgpy.statmech.schrodinger.getEntropy(double T, energy, degeneracy=unitDegeneracy, int n0=0,
int nmax=10000, double tol=1e-12) → double
Return the value of the dimensionless entropy 𝑆(𝑇 )/𝑅 at a given temperature T in K. The solution to the
Schrodinger equation is given using functions energy and degeneracy that accept as argument a quantum number
and return the corresponding energy in J/mol and degeneracy of that level. The quantum number always begins
at n0 and increases by ones. You can also change the relative tolerance tol and the maximum allowed value of
the quantum number nmax.
rmgpy.statmech.schrodinger.getHeatCapacity(double T, energy, degeneracy=unitDegeneracy, int
n0=0, int nmax=10000, double tol=1e-12) → dou-
ble
Return the value of the dimensionless heat capacity 𝐶v (𝑇 )/𝑅 at a given temperature T in K. The solution to
the Schrodinger equation is given using functions energy and degeneracy that accept as argument a quantum
number and return the corresponding energy in J/mol and degeneracy of that level. The quantum number always
begins at n0 and increases by ones. You can also change the relative tolerance tol and the maximum allowed
value of the quantum number nmax.
rmgpy.statmech.schrodinger.getPartitionFunction(double T, energy, degener-
acy=unitDegeneracy, int n0=0, int
nmax=10000, double tol=1e-12) → double
Return the value of the partition function 𝑄(𝑇 ) at a given temperature T in K. The solution to the Schrodinger
equation is given using functions energy and degeneracy that accept as argument a quantum number and return
the corresponding energy in J/mol and degeneracy of that level. The quantum number always begins at n0 and
increases by ones. You can also change the relative tolerance tol and the maximum allowed value of the quantum
number nmax.
rmgpy.statmech.schrodinger.getSumOfStates(ndarray Elist, energy, degeneracy=unitDegeneracy,
int n0=0, ndarray sumStates0=None) → ndarray
Return the values of the sum of states 𝑁 (𝐸) for a given set of energies Elist in J/mol above the ground state
using an initial sum of states sumStates0. The solution to the Schrodinger equation is given using functions
energy and degeneracy that accept as argument a quantum number and return the corresponding energy in J/mol
and degeneracy of that level. The quantum number always begins at n0 and increases by ones.
rmgpy.statmech.schrodinger.unitDegeneracy(n)

rmgpy.statmech.Conformer

class rmgpy.statmech.Conformer(E0=None, modes=None, spinMultiplicity=1, opticalIsomers=1,


number=None, mass=None, coordinates=None)
A representation of an individual molecular conformation. The attributes are:

Attribute Description
E0 The ground-state energy (including zero-point energy) of the conformer
modes A list of the molecular degrees of freedom
spinMultiplicity The degeneracy of the electronic ground state
opticalIsomers The number of optical isomers
number An array of atomic numbers of each atom in the conformer
mass An array of masses of each atom in the conformer
coordinates An array of 3D coordinates of each atom in the conformer

Note that the spinMultiplicity reflects the electronic mode of the molecular system.
E0
The ground-state energy (including zero-point energy) of the conformer.

252 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
coordinates
An array of 3D coordinates of each atom in the conformer.
getActiveModes(self, bool activeJRotor=False, bool activeKRotor=True) → list
Return a list of the active molecular degrees of freedom of the molecular system.
getCenterOfMass(self, atoms=None) → ndarray
Calculate and return the [three-dimensional] position of the center of mass of the conformer in m. If a list
atoms of atoms is specified, only those atoms will be used to calculate the center of mass. Otherwise, all
atoms will be used.
getDensityOfStates(self, ndarray Elist) → ndarray
Return the density of states 𝜌(𝐸) 𝑑𝐸 at the specified energies Elist above the ground state.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol for the system at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K for the system at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol for the system at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the heat capacity in J/mol*K for the system at the specified temperature T in K.
getInternalReducedMomentOfInertia(self, pivots, top1, option=3) → double
Calculate and return the reduced moment of inertia for an internal torsional rotation around the axis defined
by the two atoms in pivots. The list top1 contains the atoms that should be considered as part of the rotating
top; this list should contain the pivot atom connecting the top to the rest of the molecule. The procedure
used is that of Pitzer1 , which is described as 𝐼 (2,𝑜𝑝𝑡𝑖𝑜𝑛) by East and Radom2 . In this procedure, the
molecule is divided into two tops: those at either end of the hindered rotor bond. The moment of inertia
of each top is evaluated using an axis determined by option. Finally, the reduced moment of inertia is
evaluated from the moment of inertia of each top via the formula (I1*I2)/(I1+I2).
option is an integer corresponding to one of three possible ways of calculating the internal reduced
moment of inertia, as discussed in East and Radom [2]

option moments of inertia of each rotating group calculated about the axis containing the twisting
=1 bond
option each moment of inertia of each rotating group is calculated about an axis parallel to the
=2 twisting bond and passing through its center of mass
option moments of inertia of each rotating group calculated about the axis passing through the cen-
=3 ters of mass of both groups

1 1 1
= +
𝐼 (2,𝑜𝑝𝑡𝑖𝑜𝑛) 𝐼1 𝐼2

1 Pitzer, K. S. J. Chem. Phys. 14, p. 239-243 (1946).


2 East, A. L. L. and Radom, L. J. Chem. Phys. 106, p. 6655-6674 (1997).

1.14. Statistical mechanics (rmgpy.statmech) 253


RMG-Py API Reference, Release 2.4.1

getMomentOfInertiaTensor(self ) → ndarray
Calculate and return the moment of inertia tensor for the conformer in kg*m^2. If the coordinates are not
at the center of mass, they are temporarily shifted there for the purposes of this calculation.
getNumberDegreesOfFreedom(self )
Return the number of degrees of freedom in a species object, which should be 3N, and raises an exception
if it is not.
getPartitionFunction(self, double T ) → double
Return the partition function 𝑄(𝑇 ) for the system at the specified temperature T in K.
getPrincipalMomentsOfInertia(self )
Calculate and return the principal moments of inertia and corresponding principal axes for the conformer.
The moments of inertia are in kg*m^2, while the principal axes have unit length.
getSumOfStates(self, ndarray Elist) → ndarray
Return the sum of states 𝑁 (𝐸) at the specified energies Elist in kJ/mol above the ground state.
getSymmetricTopRotors(self )
Return objects representing the external J-rotor and K-rotor under the symmetric top approximation. For
nonlinear molecules, the J-rotor is a 2D rigid rotor with a rotational constant 𝐵 determined as the geometric
mean of the two most similar rotational constants. The K-rotor is a 1D rigid rotor with a rotational constant
𝐴 − 𝐵 determined by the difference between the remaining molecular rotational constant and the J-rotor
rotational constant.
getTotalMass(self, atoms=None) → double
Calculate and return the total mass of the atoms in the conformer in kg. If a list atoms of atoms is specified,
only those atoms will be used to calculate the center of mass. Otherwise, all atoms will be used.
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
mass
An array of masses of each atom in the conformer.
modes
list
Type modes
number
An array of atomic numbers of each atom in the conformer.
opticalIsomers
‘int’
Type opticalIsomers
spinMultiplicity
‘int’
Type spinMultiplicity

254 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

1.15 Thermodynamics (rmgpy.thermo)

The rmgpy.thermo subpackage contains classes that represent various thermodynamic models of heat capacity.

1.15.1 Heat capacity models

Class Description
ThermoData A heat capacity model based on a set of discrete heat capacity points
Wilhoit A heat capacity model based on the Wilhoit polynomial
NASA A heat capacity model based on a set of NASA polynomials
NASAPolynomial A heat capacity model based on a single NASA polynomial

rmgpy.thermo.ThermoData

class rmgpy.thermo.ThermoData(Tdata=None, Cpdata=None, H298=None, S298=None, Cp0=None,


CpInf=None, Tmin=None, Tmax=None, E0=None, label=”, com-
ment=”)
A heat capacity model based on a set of discrete heat capacity data points. The attributes are:

Attribute Description
Tdata An array of temperatures at which the heat capacity is known
Cpdata An array of heat capacities at the given temperatures
H298 The standard enthalpy of formation at 298 K
S298 The standard entropy at 298 K
Tmin The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature at which the model is valid, or zero if unknown or undefined
E0 The energy at zero Kelvin (including zero point energy)
comment Information about the model (e.g. its source)

Cp0
The heat capacity at zero temperature.
CpInf
The heat capacity at infinite temperature.
Cpdata
An array of heat capacities at the given temperatures.
E0
The ground state energy (J/mol) at zero Kelvin, including zero point energy, or None if not yet specified.
H298
The standard enthalpy of formation at 298 K.
S298
The standard entropy of formation at 298 K.
Tdata
An array of temperatures at which the heat capacity is known.
Tmax
The maximum temperature at which the model is valid, or None if not defined.

1.15. Thermodynamics (rmgpy.thermo) 255


RMG-Py API Reference, Release 2.4.1

Tmin
The minimum temperature at which the model is valid, or None if not defined.
as_dict(self ) → dict
A helper function for dumping objects as dictionaries for YAML files
Returns A dictionary representation of the object
Return type dict
comment
str
Type comment
discrepancy(self, HeatCapacityModel other) → double
Return some measure of how dissimilar self is from other.
The measure is arbitrary, but hopefully useful for sorting purposes. Discrepancy of 0 means they are
identical
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the constant-pressure heat capacity in J/mol*K at the specified temperature T in K.
isIdenticalTo(self, HeatCapacityModel other) → bool
Returns True if self and other report very similar thermo values for heat capacity, enthalpy, entropy, and
free energy over a wide range of temperatures, or False otherwise.
isSimilarTo(self, HeatCapacityModel other) → bool
Returns True if self and other report similar thermo values for heat capacity, enthalpy, entropy, and free
energy over a wide range of temperatures, or False otherwise.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the thermodynamic data,
or False if not. If the minimum and maximum temperature are not defined, True is returned.
label
str
Type label
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
toNASA(self, double Tmin, double Tmax, double Tint, bool fixedTint=False, bool weighting=True, int
continuity=3) → NASA
Convert the object to a NASA object. You must specify the minimum and maximum temperatures of the fit

256 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Tmin and Tmax in K, as well as the intermediate temperature Tint in K to use as the bridge between the
two fitted polynomials. The remaining parameters can be used to modify the fitting algorithm used:
• fixedTint - False to allow Tint to vary in order to improve the fit, or True to keep it fixed
• weighting - True to weight the fit by 𝑇 −1 to emphasize good fit at lower temperatures, or False to
not use weighting
• continuity - The number of continuity constraints to enforce at Tint:
– 0: no constraints on continuity of 𝐶p (𝑇 ) at Tint
– 1: constrain 𝐶p (𝑇 ) to be continous at Tint
𝑑𝐶p
– 2: constrain 𝐶p (𝑇 ) and 𝑑𝑇 to be continuous at Tint
𝑑𝐶p 𝑑2 𝐶p
– 3: constrain 𝐶p (𝑇 ), 𝑑𝑇 , and 𝑑𝑇 2 to be continuous at Tint
2
𝑑𝐶p 𝑑 𝐶p 𝑑3 𝐶p
– 4: constrain 𝐶p (𝑇 ), 𝑑𝑇 , 𝑑𝑇 2 , and 𝑑𝑇 3 to be continuous at Tint
𝑑𝐶p 𝑑2 𝐶p 𝑑3 𝐶p 𝑑4 𝐶p
– 5: constrain 𝐶p (𝑇 ), 𝑑𝑇 , 𝑑𝑇 2 , 𝑑𝑇 3 , and 𝑑𝑇 4 to be continuous at Tint
Note that values of continuity of 5 or higher effectively constrain all the coefficients to be equal and should
be equivalent to fitting only one polynomial (rather than two).
Returns the fitted NASA object containing the two fitted NASAPolynomial objects.
toWilhoit(self, B=None) → Wilhoit
Convert the Benson model to a Wilhoit model. For the conversion to succeed, you must have set the Cp0
and CpInf attributes of the Benson model.
B: the characteristic temperature in Kelvin.

rmgpy.thermo.Wilhoit

class rmgpy.thermo.Wilhoit(Cp0=None, CpInf=None, a0=0.0, a1=0.0, a2=0.0, a3=0.0, H0=None,


S0=None, B=None, Tmin=None, Tmax=None, label=”, comment=”)
A heat capacity model based on the Wilhoit equation. The attributes are:

Attribute Description
a0 The zeroth-order Wilhoit polynomial coefficient
a1 The first-order Wilhoit polynomial coefficient
a2 The second-order Wilhoit polynomial coefficient
a3 The third-order Wilhoit polynomial coefficient
H0 The integration constant for enthalpy (not H at T=0)
S0 The integration constant for entropy (not S at T=0)
E0 The energy at zero Kelvin (including zero point energy)
B The Wilhoit scaled temperature coefficient in K
Tmin The minimum temperature in K at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature in K at which the model is valid, or zero if unknown or undefined
comment Information about the model (e.g. its source)

The Wilhoit polynomial is an expression for heat capacity that is guaranteed to give the correct limits at zero
and infinite temperature, and gives a very reasonable shape to the heat capacity profile in between:
[︃ 3
]︃
∑︁
2 𝑖
𝐶p (𝑇 ) = 𝐶p (0) + [𝐶p (∞) − 𝐶p (0)] 𝑦 1 + (𝑦 − 1) 𝑎𝑖 𝑦
𝑖=0

1.15. Thermodynamics (rmgpy.thermo) 257


RMG-Py API Reference, Release 2.4.1

Above, 𝑦 ≡ 𝑇 /(𝑇 + 𝐵) is a scaled temperature that ranges from zero to one based on the value of the coefficient
𝐵, and 𝑎0 , 𝑎1 , 𝑎2 , and 𝑎3 are the Wilhoit polynomial coefficients.
The enthalpy is given by

𝐻(𝑇 ) = 𝐻0 + 𝐶p (0)𝑇 + [𝐶p (∞) − 𝐶p (0)] 𝑇


⎧[︃ ]︃ [︂ ⎫
3 (︂ )︂ ]︂ 3 𝑖 3
⎨ ∑︁ 1 1 𝑇 ∑︁ 𝑦 ∑︁ ⎬
2+ 𝑎𝑖 𝑦−1+ − 1 ln + 𝑦2 𝑓𝑖𝑗 𝑎𝑗

𝑖=0
2 𝑦 𝑦 𝑖=0
(𝑖 + 2)(𝑖 + 3) 𝑗=0 ⎭

where 𝑓𝑖𝑗 = 3 + 𝑗 if 𝑖 = 𝑗, 𝑓𝑖𝑗 = 1 if 𝑖 > 𝑗, and 𝑓𝑖𝑗 = 0 if 𝑖 < 𝑗.


The entropy is given by
[︃ (︃ 3
)︃ ]︃
∑︁ 𝑎𝑖 𝑦 𝑖
𝑆(𝑇 ) = 𝑆0 + 𝐶p (∞) ln 𝑇 − [𝐶p (∞) − 𝐶p (0)] ln 𝑦 + 1+𝑦 𝑦
𝑖=0
2+𝑖

The low-temperature limit 𝐶p (0) is 3.5𝑅 for linear molecules and 4𝑅 for nonlinear molecules.
The high-temperature limit 𝐶p (∞) is taken to be [3𝑁atoms − 1.5] 𝑅 for linear molecules and
[3𝑁atoms − (2 + 0.5𝑁rotors )] 𝑅 for nonlinear molecules, for a molecule composed of 𝑁atoms atoms and 𝑁rotors
internal rotors.
B
The Wilhoit scaled temperature coefficient.
Cp0
The heat capacity at zero temperature.
CpInf
The heat capacity at infinite temperature.
E0
The ground state energy (J/mol) at zero Kelvin, including zero point energy.
For the Wilhoit class, this is calculated as the Enthalpy at 0.001 Kelvin.
H0
The integration constant for enthalpy.
NB. this is not equal to the enthlapy at 0 Kelvin, which you can access via E0
S0
The integration constant for entropy.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
a0
‘double’
Type a0
a1
‘double’
Type a1
a2
‘double’

258 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

Type a2
a3
‘double’
Type a3
as_dict(self ) → dict
A helper function for YAML parsing
comment
str
Type comment
copy(self ) → Wilhoit
Return a copy of the Wilhoit object.
discrepancy(self, HeatCapacityModel other) → double
Return some measure of how dissimilar self is from other.
The measure is arbitrary, but hopefully useful for sorting purposes. Discrepancy of 0 means they are
identical
fitToData(self, ndarray Tdata, ndarray Cpdata, double Cp0, double CpInf, double H298, double S298,
double B0=500.0)
Fit a Wilhoit model to the data points provided, allowing the characteristic temperature B to vary so as to
improve the fit. This procedure requires an optimization, using the fminbound function in the scipy.
optimize module. The data consists of a set of heat capacity points Cpdata in J/mol*K at a given set
of temperatures Tdata in K, along with the enthalpy H298 in kJ/mol and entropy S298 in J/mol*K at 298
K. The linearity of the molecule, number of vibrational frequencies, and number of internal rotors (linear,
Nfreq, and Nrotors, respectively) is used to set the limits at zero and infinite temperature.
fitToDataForConstantB(self, ndarray Tdata, ndarray Cpdata, double Cp0, double CpInf, double
H298, double S298, double B)
Fit a Wilhoit model to the data points provided using a specified value of the characteristic temperature
B. The data consists of a set of dimensionless heat capacity points Cpdata at a given set of temperatures
Tdata in K, along with the dimensionless heat capacity at zero and infinite temperature, the dimensionless
enthalpy H298 at 298 K, and the dimensionless entropy S298 at 298 K.
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the constant-pressure heat capacity in J/mol*K at the specified temperature T in K.
isIdenticalTo(self, HeatCapacityModel other) → bool
Returns True if self and other report very similar thermo values for heat capacity, enthalpy, entropy, and
free energy over a wide range of temperatures, or False otherwise.
isSimilarTo(self, HeatCapacityModel other) → bool
Returns True if self and other report similar thermo values for heat capacity, enthalpy, entropy, and free
energy over a wide range of temperatures, or False otherwise.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the thermodynamic data,
or False if not. If the minimum and maximum temperature are not defined, True is returned.

1.15. Thermodynamics (rmgpy.thermo) 259


RMG-Py API Reference, Release 2.4.1

label
str
Type label
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
toNASA(self, double Tmin, double Tmax, double Tint, bool fixedTint=False, bool weighting=True, int
continuity=3) → NASA
Convert the Wilhoit object to a NASA object. You must specify the minimum and maximum temperatures
of the fit Tmin and Tmax in K, as well as the intermediate temperature Tint in K to use as the bridge
between the two fitted polynomials. The remaining parameters can be used to modify the fitting algorithm
used:
• fixedTint - False to allow Tint to vary in order to improve the fit, or True to keep it fixed
• weighting - True to weight the fit by 𝑇 −1 to emphasize good fit at lower temperatures, or False to
not use weighting
• continuity - The number of continuity constraints to enforce at Tint:
– 0: no constraints on continuity of 𝐶p (𝑇 ) at Tint
– 1: constrain 𝐶p (𝑇 ) to be continous at Tint
𝑑𝐶p
– 2: constrain 𝐶p (𝑇 ) and 𝑑𝑇 to be continuous at Tint
𝑑𝐶p 𝑑2 𝐶p
– 3: constrain 𝐶p (𝑇 ), 𝑑𝑇 , and 𝑑𝑇 2 to be continuous at Tint
2
𝑑𝐶p 𝑑 𝐶p 𝑑3 𝐶p
– 4: constrain 𝐶p (𝑇 ), 𝑑𝑇 , 𝑑𝑇 2 , and 𝑑𝑇 3 to be continuous at Tint
2 3
𝑑𝐶p 𝑑 𝐶p 𝑑 𝐶p 𝑑4 𝐶p
– 5: constrain 𝐶p (𝑇 ), 𝑑𝑇 , 𝑑𝑇 2 , 𝑑𝑇 3 , and 𝑑𝑇 4 to be continuous at Tint
Note that values of continuity of 5 or higher effectively constrain all the coefficients to be equal and should
be equivalent to fitting only one polynomial (rather than two).
Returns the fitted NASA object containing the two fitted NASAPolynomial objects.
toThermoData(self ) → ThermoData
Convert the Wilhoit model to a ThermoData object.

rmgpy.thermo.NASA

class rmgpy.thermo.NASA(polynomials=None, Tmin=None, Tmax=None, E0=None, Cp0=None,


CpInf=None, label=”, comment=”)
A heat capacity model based on a set of one, two, or three NASAPolynomial objects. The attributes are:

Attribute Description
polynomials The list of NASA polynomials to use in this model
Tmin The minimum temperature in K at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature in K at which the model is valid, or zero if unknown or undefined
E0 The energy at zero Kelvin (including zero point energy)
comment Information about the model (e.g. its source)

260 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

The NASA polynomial is another representation of the heat capacity, enthalpy, and entropy using seven or nine
coefficients a = [𝑎−2 𝑎−1 𝑎0 𝑎1 𝑎2 𝑎3 𝑎4 𝑎5 𝑎6 ]. The relevant thermodynamic parameters are evaluated via the
expressions

𝐶p (𝑇 )
= 𝑎−2 𝑇 −2 + 𝑎−1 𝑇 −1 + 𝑎0 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4
𝑅
𝐻(𝑇 ) 1 1 1 1 𝑎5
= −𝑎−2 𝑇 −2 + 𝑎−1 𝑇 −1 ln 𝑇 + 𝑎0 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4 +
𝑅𝑇 2 3 4 5 𝑇
𝑆(𝑇 ) 1 1 1 1
= − 𝑎−2 𝑇 −2 − 𝑎−1 𝑇 −1 + 𝑎0 ln 𝑇 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4 + 𝑎6
𝑅 2 2 3 4
In the seven-coefficient version, 𝑎−2 = 𝑎−1 = 0.
As simple polynomial expressions, the NASA polynomial is faster to evaluate when compared to the Wilhoit
model; however, it does not have the nice physical behavior of the Wilhoit representation. Often multiple NASA
polynomials are used to accurately represent the thermodynamics of a system over a wide temperature range.
Cp0
The heat capacity at zero temperature.
CpInf
The heat capacity at infinite temperature.
E0
The ground state energy (J/mol) at zero Kelvin, including zero point energy, or None if not yet specified.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
as_dict(self ) → dict
A helper function for YAML dumping
changeBaseEnthalpy(self, double deltaH ) → NASA
Add deltaH in J/mol to the base enthalpy of formation H298 and return the modified NASA object.
changeBaseEntropy(self, double deltaS) → NASA
Add deltaS in J/molK to the base entropy of formation S298 and return the modified NASA object
comment
str
Type comment
discrepancy(self, HeatCapacityModel other) → double
Return some measure of how dissimilar self is from other.
The measure is arbitrary, but hopefully useful for sorting purposes. Discrepancy of 0 means they are
identical
getEnthalpy(self, double T ) → double
Return the enthalpy 𝐻(𝑇 ) in J/mol at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy 𝑆(𝑇 ) in J/mol*K at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy 𝐺(𝑇 ) in J/mol at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the constant-pressure heat capacity 𝐶p (𝑇 ) in J/mol*K at the specified temperature T in K.

1.15. Thermodynamics (rmgpy.thermo) 261


RMG-Py API Reference, Release 2.4.1

isIdenticalTo(self, HeatCapacityModel other) → bool


Returns True if self and other report very similar thermo values for heat capacity, enthalpy, entropy, and
free energy over a wide range of temperatures, or False otherwise.
isSimilarTo(self, HeatCapacityModel other) → bool
Returns True if self and other report similar thermo values for heat capacity, enthalpy, entropy, and free
energy over a wide range of temperatures, or False otherwise.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the thermodynamic data,
or False if not. If the minimum and maximum temperature are not defined, True is returned.
label
str
Type label
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves
Returns None
poly1
rmgpy.thermo.nasa.NASAPolynomial
Type poly1
poly2
rmgpy.thermo.nasa.NASAPolynomial
Type poly2
poly3
rmgpy.thermo.nasa.NASAPolynomial
Type poly3
polynomials
The set of one, two, or three NASA polynomials.
selectPolynomial(self, double T ) → NASAPolynomial
toCantera(self )
Return the cantera equivalent NasaPoly2 object from this NASA object.
toThermoData(self ) → ThermoData
Convert the NASAPolynomial model to a ThermoData object.
If Cp0 and CpInf are omitted or 0, they are None in the returned ThermoData.
toWilhoit(self ) → Wilhoit
Convert a MultiNASA object multiNASA to a Wilhoit object. You must specify the linearity of the
molecule linear, the number of vibrational modes Nfreq, and the number of hindered rotor modes Nrotors
so the algorithm can determine the appropriate heat capacity limits at zero and infinite temperature.
Here is an example of a NASA entry:

262 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

entry(
index = 2,
label = "octane",
molecule =
"""
1 C 0 {2,S}
2 C 0 {1,S} {3,S}
3 C 0 {2,S} {4,S}
4 C 0 {3,S} {5,S}
5 C 0 {4,S} {6,S}
6 C 0 {5,S} {7,S}
7 C 0 {6,S} {8,S}
8 C 0 {7,S}
""",
thermo = NASA(
polynomials = [
NASAPolynomial(coeffs=[1.25245480E+01,-1.01018826E-02,2.21992610E-04,-2.84863722E-07,1.
˓→12410138E-10,-2.98434398E+04,-1.97109989E+01], Tmin=(200,'K'), Tmax=(1000,'K')),

NASAPolynomial(coeffs=[2.09430708E+01,4.41691018E-02,-1.53261633E-05,2.30544803E-09,-1.
˓→29765727E-13,-3.55755088E+04,-8.10637726E+01], Tmin=(1000,'K'), Tmax=(6000,'K')),

],
Tmin = (200,'K'),
Tmax = (6000,'K'),
),
reference = Reference(authors=["check on burcat"], title='burcat', year="1999", url="http://www.
˓→me.berkeley.edu/gri-mech/version30/text30.html"),

referenceType = "review",
shortDesc = u"""""",
longDesc =
u"""

""",
)

rmgpy.thermo.NASAPolynomial

class rmgpy.thermo.NASAPolynomial(coeffs=None, Tmin=None, Tmax=None, E0=None, label=”,


comment=”)
A heat capacity model based on the NASA polynomial. Both the seven-coefficient and nine-coefficient varia-
tions are supported. The attributes are:

Attribute Description
coeffs The seven or nine NASA polynomial coefficients
Tmin The minimum temperature in K at which the model is valid, or zero if unknown or undefined
Tmax The maximum temperature in K at which the model is valid, or zero if unknown or undefined
E0 The energy at zero Kelvin (including zero point energy)
comment Information about the model (e.g. its source)

The NASA polynomial is another representation of the heat capacity, enthalpy, and entropy using seven or nine
coefficients a = [𝑎−2 𝑎−1 𝑎0 𝑎1 𝑎2 𝑎3 𝑎4 𝑎5 𝑎6 ]. The relevant thermodynamic parameters are evaluated via the
expressions

𝐶p (𝑇 )
= 𝑎−2 𝑇 −2 + 𝑎−1 𝑇 −1 + 𝑎0 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4
𝑅

1.15. Thermodynamics (rmgpy.thermo) 263


RMG-Py API Reference, Release 2.4.1

𝐻(𝑇 ) 1 1 1 1 𝑎5
= −𝑎−2 𝑇 −2 + 𝑎−1 𝑇 −1 ln 𝑇 + 𝑎0 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4 +
𝑅𝑇 2 3 4 5 𝑇
𝑆(𝑇 ) 1 1 1 1
= − 𝑎−2 𝑇 −2 − 𝑎−1 𝑇 −1 + 𝑎0 ln 𝑇 + 𝑎1 𝑇 + 𝑎2 𝑇 2 + 𝑎3 𝑇 3 + 𝑎4 𝑇 4 + 𝑎6
𝑅 2 2 3 4
In the seven-coefficient version, 𝑎−2 = 𝑎−1 = 0.
As simple polynomial expressions, the NASA polynomial is faster to evaluate when compared to the Wilhoit
model; however, it does not have the nice physical behavior of the Wilhoit representation. Often multiple NASA
polynomials are used to accurately represent the thermodynamics of a system over a wide temperature range;
the NASA class is available for this purpose.
Cp0
The heat capacity at zero temperature.
CpInf
The heat capacity at infinite temperature.
E0
The ground state energy (J/mol) at zero Kelvin, including zero point energy, or None if not yet specified.
Tmax
The maximum temperature at which the model is valid, or None if not defined.
Tmin
The minimum temperature at which the model is valid, or None if not defined.
as_dict(self )
c0
‘double’
Type c0
c1
‘double’
Type c1
c2
‘double’
Type c2
c3
‘double’
Type c3
c4
‘double’
Type c4
c5
‘double’
Type c5
c6
‘double’
Type c6
changeBaseEnthalpy(self, double deltaH )
Add deltaH in J/mol to the base enthalpy of formation H298.

264 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

changeBaseEntropy(self, double deltaS)


Add deltaS in J/molK to the base entropy of formation S298.
cm1
‘double’
Type cm1
cm2
‘double’
Type cm2
coeffs
The set of seven or nine NASA polynomial coefficients.
comment
str
Type comment
discrepancy(self, HeatCapacityModel other) → double
Return some measure of how dissimilar self is from other.
The measure is arbitrary, but hopefully useful for sorting purposes. Discrepancy of 0 means they are
identical
getEnthalpy(self, double T ) → double
Return the enthalpy in J/mol at the specified temperature T in K.
getEntropy(self, double T ) → double
Return the entropy in J/mol*K at the specified temperature T in K.
getFreeEnergy(self, double T ) → double
Return the Gibbs free energy in J/mol at the specified temperature T in K.
getHeatCapacity(self, double T ) → double
Return the constant-pressure heat capacity in J/mol*K at the specified temperature T in K.
isIdenticalTo(self, HeatCapacityModel other) → bool
Returns True if self and other report very similar thermo values for heat capacity, enthalpy, entropy, and
free energy over a wide range of temperatures, or False otherwise.
isSimilarTo(self, HeatCapacityModel other) → bool
Returns True if self and other report similar thermo values for heat capacity, enthalpy, entropy, and free
energy over a wide range of temperatures, or False otherwise.
isTemperatureValid(self, double T ) → bool
Return True if the temperature T in K is within the valid temperature range of the thermodynamic data,
or False if not. If the minimum and maximum temperature are not defined, True is returned.
label
str
Type label
make_object(self, dict data, dict class_dict)
A helper function for constructing objects from a dictionary (used when loading YAML files)
Parameters
• data (dict) – The dictionary representation of the object
• class_dict (dict) – A mapping of class names to the classes themselves

1.15. Thermodynamics (rmgpy.thermo) 265


RMG-Py API Reference, Release 2.4.1

Returns None

1.16 RMG Exceptions (rmgpy.exceptions)

This module contains classes which extend Exception for usage in the RMG module
exception rmgpy.exceptions.ActionError
An exception class for errors that occur while applying reaction recipe actions. Pass a string describing the
circumstances that caused the exceptional behavior.
exception rmgpy.exceptions.AtomTypeError
An exception to be raised when an error occurs while working with atom types. Pass a string describing the
circumstances that caused the exceptional behavior.
exception rmgpy.exceptions.ChemicallySignificantEigenvaluesError
An exception raised when the chemically significant eigenvalue method is unsuccessful for any reason. Pass a
string describing the cause of the exceptional behavior.
exception rmgpy.exceptions.ChemkinError
An exception class for exceptional behavior involving Chemkin files. Pass a string describing the circumstances
that caused the exceptional behavior.
exception rmgpy.exceptions.CollisionError
An exception class for when RMG is unable to calculate collision efficiencies for the single exponential down
pressure dependent solver. Pass a string describing the circumstances that caused the exceptional behavior.
exception rmgpy.exceptions.CoreError
An exception raised if there is a problem within the model core
exception rmgpy.exceptions.DatabaseError
A exception that occurs when working with an RMG database. Pass a string giving specifics about the excep-
tional behavior.
exception rmgpy.exceptions.DependencyError
An exception that occurs when an error is encountered with a dependency. Pass a string describing the circum-
stances that caused the exception.
exception rmgpy.exceptions.ElementError
An exception class for errors that occur while working with elements. Pass a string describing the circumstances
that caused the exceptional behavior.
exception rmgpy.exceptions.ForbiddenStructureException
An exception passed when RMG encounters a forbidden structure. These are usually caught and the reaction
that created it is ignored.
exception rmgpy.exceptions.ILPSolutionError
An exception to be raised when solving an integer linear programming problem if a solution could not be found
or the solution is not valid. Can pass a string to indicate the reason that the solution is invalid.
exception rmgpy.exceptions.ImplicitBenzeneError
An exception class when encountering a group with too many implicit benzene atoms. These groups are hard to
create sample molecules and hard for users to interpret. Pass a string describing the limitation.
exception rmgpy.exceptions.InchiException
An exception used when encountering a non-valid Inchi expression are encountered. Pass a string describing
the error.

266 Chapter 1. RMG API Reference


RMG-Py API Reference, Release 2.4.1

exception rmgpy.exceptions.InputError
An exception raised when parsing an input file for any module in RMG: mechanism generation, Arkane, con-
former creation, etc. Pass a string describing the error.
exception rmgpy.exceptions.InvalidActionError
An exception to be raised when an invalid action is encountered in a reaction recipe.
exception rmgpy.exceptions.InvalidAdjacencyListError
An exception used to indicate that an RMG-style adjacency list is invalid. Pass a string describing the reason
the adjacency list is invalid
exception rmgpy.exceptions.InvalidMicrocanonicalRateError(message, k_ratio=1.0,
Keq_ratio=1.0)
Used in pressure dependence when the k(E) calculation does not give the correct kf(T) or Kc(T)
badness()
How bad is the error?
Returns the max of the absolute logarithmic errors of kf and Kc
exception rmgpy.exceptions.KekulizationError
An exception to be raised when encountering an error while kekulizing an aromatic molecule. Can pass a string
to indicate the reason for failure.
exception rmgpy.exceptions.KineticsError
An exception class for problems with kinetics. This can be used when finding degeneracy in reaction generation,
modifying KineticsData objects, or finding the kinetics of reactions. Unable Pass a string describing the problem.
exception rmgpy.exceptions.ModifiedStrongCollisionError
An exception raised when the modified strong collision method is unsuccessful for any reason. Pass a string
describing the cause of the exceptional behavior.
exception rmgpy.exceptions.NegativeBarrierException
This Exception occurs when the energy barrier for a hindered Rotor is negative. This can occur if the scan or
fourier fit is poor.
exception rmgpy.exceptions.NetworkError
Raised when an error occurs while working with a pressure-dependent reaction network
exception rmgpy.exceptions.OutputError
This exception is raised whenever an error occurs while saving output information. Pass a string describing the
circumstances of the exceptional behavior.
exception rmgpy.exceptions.PressureDependenceError
An exception class to use when an error involving pressure dependence is encountered. Pass a string describing
the circumstances of the exceptional behavior.
exception rmgpy.exceptions.QuantityError
An exception to be raised when an error occurs while working with physical quantities in RMG. Pass a string
describing the circumstances of the exceptional behavior.
exception rmgpy.exceptions.ReactionError
An exception class for exceptional behavior involving Reaction objects. Pass a string describing the circum-
stances that caused the exceptional behavior.
exception rmgpy.exceptions.ReactionPairsError
An exception to be raised when an error occurs while working with reaction pairs.
exception rmgpy.exceptions.ReservoirStateError
An exception raised when the reservoir state method is unsuccessful for any reason. Pass a string describing the
cause of the exceptional behavior.

1.16. RMG Exceptions (rmgpy.exceptions) 267


RMG-Py API Reference, Release 2.4.1

exception rmgpy.exceptions.ResonanceError
An exception class for when RMG is unable to generate resonance structures.
exception rmgpy.exceptions.SettingsError
An exception raised when dealing with settings.
exception rmgpy.exceptions.SpeciesError
An exception class for exceptional behavior that occurs while working with chemical species. Pass a string
describing the circumstances that caused the exceptional behavior.
exception rmgpy.exceptions.StatmechError
An exception used when an error occurs in estimating Statmech.
exception rmgpy.exceptions.StatmechFitError
An exception used when attempting to fit molecular degrees of freedom to heat capacity data. Pass a string
describing the circumstances of the exceptional behavior.
exception rmgpy.exceptions.UndeterminableKineticsError(reaction, message=”)
An exception raised when attempts to estimate appropriate kinetic parameters for a chemical reaction are un-
successful.
exception rmgpy.exceptions.UnexpectedChargeError(graph)
An exception class when encountering a group/molecule with unexpected charge Curently in RMG, we never
expect to see -2/+2 or greater magnitude charge, we only except +1/-1 charges on nitrogen, oxygen, sulfur or
specifically carbon monoxide/monosulfide.
Attributes: graph is the molecule or group object with the unexpected charge
exception rmgpy.exceptions.VF2Error
An exception raised if an error occurs within the VF2 graph isomorphism algorithm. Pass a string describing
the error.

268 Chapter 1. RMG API Reference


BIBLIOGRAPHY

[1932Wigner] E.Wigner. Phys. Rev. 40, p. 749-759 (1932). doi:10.1103/PhysRev.40.749


[1959Bell] R. P. Bell. Trans. Faraday Soc. 55, p. 1-4 (1959). doi:10.1039/TF9595500001
[Chang2000] A. Y. Chang, J. W. Bozzelli, and A. M. Dean. Z. Phys. Chem. 214, p. 1533-1568 (2000). doi:
10.1524/zpch.2000.214.11.1533

269
RMG-Py API Reference, Release 2.4.1

270 Bibliography
PYTHON MODULE INDEX

a
arkane, 3

r
rmgpy.chemkin, 11
rmgpy.constants, 14
rmgpy.data, 15
rmgpy.exceptions, 266
rmgpy.kinetics, 79
rmgpy.molecule, 99
rmgpy.molecule.adjlist, 148
rmgpy.molecule.converter, 146
rmgpy.molecule.kekulize, 142
rmgpy.molecule.pathfinder, 144
rmgpy.molecule.resonance, 139
rmgpy.molecule.translator, 147
rmgpy.pdep, 152
rmgpy.qm, 161
rmgpy.quantity, 179
rmgpy.reaction, 185
rmgpy.rmg, 192
rmgpy.solver, 212
rmgpy.species, 232
rmgpy.statmech, 238
rmgpy.statmech.schrodinger, 251
rmgpy.thermo, 255

271
RMG-Py API Reference, Release 2.4.1

272 Python Module Index


INDEX

A method), 193
A (rmgpy.kinetics.Arrhenius attribute), 81 addPathReaction() (rmgpy.rmg.pdep.PDepNetwork
a0 (rmgpy.thermo.Wilhoit attribute), 258 method), 200
a1 (rmgpy.thermo.Wilhoit attribute), 258 addReactionLibraryToEdge()
a2 (rmgpy.thermo.Wilhoit attribute), 258 (rmgpy.rmg.model.CoreEdgeReactionModel
a3 (rmgpy.thermo.Wilhoit attribute), 259 method), 193
ActionError, 266 addReactionLibraryToOutput()
activeJRotor (rmgpy.pdep.Configuration attribute), (rmgpy.rmg.model.CoreEdgeReactionModel
156 method), 193
activeKRotor (rmgpy.pdep.Configuration attribute), addReactionsToSurface()
156 (rmgpy.solver.LiquidReactor method), 226
add_allyls (in module rmgpy.molecule.pathfinder), addReactionsToSurface()
144 (rmgpy.solver.ReactionSystem method), 212
add_inverse_allyls (in module addReactionsToSurface()
rmgpy.molecule.pathfinder), 144 (rmgpy.solver.SimpleReactor method), 218
_ _
add unsaturated bonds (in module addReactionToCore()
rmgpy.molecule.pathfinder), 144 (rmgpy.rmg.model.CoreEdgeReactionModel
addAction() (rmgpy.data.kinetics.ReactionRecipe method), 193
method), 51 addReactionToEdge()
addAtom() (rmgpy.molecule.Group method), 132 (rmgpy.rmg.model.CoreEdgeReactionModel
addAtom() (rmgpy.molecule.Molecule method), 118 method), 193
addAtomLabelsForReaction() addReactionToUnimolecularNetworks()
(rmgpy.data.kinetics.KineticsFamily method), (rmgpy.rmg.model.CoreEdgeReactionModel
30 method), 193
addBond() (rmgpy.molecule.Group method), 132 addReverseAttribute()
addBond() (rmgpy.molecule.Molecule method), 118 (rmgpy.data.kinetics.KineticsFamily method),
addEdge() (rmgpy.molecule.graph.Graph method), 103 30
addEdge() (rmgpy.molecule.Group method), 133 addSeedMechanismToCore()
addEdge() (rmgpy.molecule.Molecule method), 119 (rmgpy.rmg.model.CoreEdgeReactionModel
addEntry() (rmgpy.data.kinetics.KineticsFamily method), 193
method), 30 addSpeciesToCore() (rmgpy.rmg.model.CoreEdgeReactionModel
addExplicitLigands() (rmgpy.molecule.Group method), 193
method), 133 addSpeciesToEdge() (rmgpy.rmg.model.CoreEdgeReactionModel
addImplicitAtomsFromAtomType() method), 194
(rmgpy.molecule.Group method), 133 addVertex() (rmgpy.molecule.graph.Graph method),
addImplicitBenzene() (rmgpy.molecule.Group 103
method), 133 addVertex() (rmgpy.molecule.Group method), 133
addKineticsRulesFromTrainingSet() addVertex() (rmgpy.molecule.Molecule method), 119
(rmgpy.data.kinetics.KineticsFamily method), adjustSurface() (rmgpy.rmg.model.CoreEdgeReactionModel
30 method), 194
addNewSurfaceObjects() advance() (rmgpy.solver.LiquidReactor method), 226
(rmgpy.rmg.model.CoreEdgeReactionModel advance() (rmgpy.solver.ReactionSystem method), 212

273
RMG-Py API Reference, Release 2.4.1

advance() (rmgpy.solver.SimpleReactor method), 218 applyAction() (rmgpy.molecule.Atom method), 113


allDouble (rmgpy.molecule.AtomType attribute), 108 applyAction() (rmgpy.molecule.Bond method), 116
allow_max_rate_violation applyAction() (rmgpy.molecule.GroupAtom method),
(rmgpy.data.kinetics.DepositoryReaction 128
attribute), 19 applyAction() (rmgpy.molecule.GroupBond method),
allow_max_rate_violation 131
(rmgpy.data.kinetics.LibraryReaction at- applyChemicallySignificantEigenvaluesMethod()
tribute), 44 (in module rmgpy.pdep.cse), 161
allow_max_rate_violation applyChemicallySignificantEigenvaluesMethod()
(rmgpy.data.kinetics.TemplateReaction at- (rmgpy.pdep.Network method), 158
tribute), 63 applyChemicallySignificantEigenvaluesMethod()
allow_max_rate_violation (rmgpy.rmg.pdep.PDepNetwork method), 200
(rmgpy.reaction.Reaction attribute), 186 applyForward() (rmgpy.data.kinetics.ReactionRecipe
allow_max_rate_violation method), 51
(rmgpy.rmg.pdep.PDepReaction attribute), applyInverseLaplaceTransformMethod() (in
202 module rmgpy.pdep), 155
allow_pdep_route (rmgpy.data.kinetics.DepositoryReaction applyKineticsToReaction()
attribute), 19 (rmgpy.rmg.model.CoreEdgeReactionModel
allow_pdep_route (rmgpy.data.kinetics.LibraryReaction method), 194
attribute), 44 applyModifiedStrongCollisionMethod() (in
allow_pdep_route (rmgpy.data.kinetics.TemplateReaction module rmgpy.pdep.msc), 160
attribute), 63 applyModifiedStrongCollisionMethod()
allow_pdep_route (rmgpy.reaction.Reaction at- (rmgpy.pdep.Network method), 158
tribute), 186 applyModifiedStrongCollisionMethod()
allow_pdep_route (rmgpy.rmg.pdep.PDepReaction (rmgpy.rmg.pdep.PDepNetwork method),
attribute), 202 200
alpha (rmgpy.kinetics.Troe attribute), 96 applyRecipe() (rmgpy.data.kinetics.KineticsFamily
alpha0 (rmgpy.pdep.SingleExponentialDown attribute), method), 30
153 applyReservoirStateMethod() (in module
analyze_molecule (in module rmgpy.pdep.rs), 160
rmgpy.molecule.resonance), 140 applyReservoirStateMethod()
ancestors() (rmgpy.data.base.Database method), 17 (rmgpy.pdep.Network method), 158
ancestors() (rmgpy.data.kinetics.KineticsDepository applyReservoirStateMethod()
method), 27 (rmgpy.rmg.pdep.PDepNetwork method),
ancestors() (rmgpy.data.kinetics.KineticsFamily 200
method), 30 applyReverse() (rmgpy.data.kinetics.ReactionRecipe
ancestors() (rmgpy.data.kinetics.KineticsGroups method), 51
method), 37 applyRRKMTheory() (in module rmgpy.pdep), 154
ancestors() (rmgpy.data.kinetics.KineticsLibrary applyThermoToSpecies()
method), 39 (rmgpy.rmg.model.CoreEdgeReactionModel
ancestors() (rmgpy.data.kinetics.KineticsRules method), 194
method), 42 areSiblings() (rmgpy.data.base.Database method),
ancestors() (rmgpy.data.statmech.StatmechDepository 17
method), 52 areSiblings() (rmgpy.data.kinetics.KineticsDepository
ancestors() (rmgpy.data.statmech.StatmechGroups method), 27
method), 59 areSiblings() (rmgpy.data.kinetics.KineticsFamily
ancestors() (rmgpy.data.statmech.StatmechLibrary method), 30
method), 61 areSiblings() (rmgpy.data.kinetics.KineticsGroups
ancestors() (rmgpy.data.thermo.ThermoDepository method), 37
method), 72 areSiblings() (rmgpy.data.kinetics.KineticsLibrary
ancestors() (rmgpy.data.thermo.ThermoGroups method), 39
method), 74 areSiblings() (rmgpy.data.kinetics.KineticsRules
ancestors() (rmgpy.data.thermo.ThermoLibrary method), 42
method), 76 areSiblings() (rmgpy.data.statmech.StatmechDepository

274 Index
RMG-Py API Reference, Release 2.4.1

method), 52 atol_array (rmgpy.solver.LiquidReactor attribute), 226


areSiblings() (rmgpy.data.statmech.StatmechGroups atol_array (rmgpy.solver.ReactionSystem attribute),
method), 59 213
areSiblings() (rmgpy.data.statmech.StatmechLibrary atol_array (rmgpy.solver.SimpleReactor attribute),
method), 61 219
areSiblings() (rmgpy.data.thermo.ThermoDepository Atom (class in rmgpy.molecule), 113
method), 72 atomIDValid() (rmgpy.molecule.Molecule method),
areSiblings() (rmgpy.data.thermo.ThermoGroups 119
method), 74 atoms (rmgpy.molecule.Group attribute), 133
areSiblings() (rmgpy.data.thermo.ThermoLibrary atoms (rmgpy.molecule.kekulize.AromaticRing at-
method), 76 tribute), 143
Arkane (class in arkane), 7 atoms (rmgpy.molecule.Molecule attribute), 119
arkane (module), 3 AtomType (class in rmgpy.molecule), 107
AromaticBond (class in rmgpy.molecule.kekulize), 142 atomType (rmgpy.molecule.Atom attribute), 113
AromaticRing (class in rmgpy.molecule.kekulize), 143 atomType (rmgpy.molecule.GroupAtom attribute), 128
ArrayQuantity (class in rmgpy.quantity), 182 AtomTypeError, 266
Arrhenius (class in rmgpy.kinetics), 80 aug_inchi (rmgpy.rmg.model.Species attribute), 208
arrhenius (rmgpy.kinetics.MultiArrhenius attribute), aug_inchi (rmgpy.species.Species attribute), 233
83
arrhenius (rmgpy.kinetics.MultiPDepArrhenius at- B
tribute), 87 B (rmgpy.thermo.Wilhoit attribute), 258
arrhenius (rmgpy.kinetics.PDepArrhenius attribute), badness() (rmgpy.exceptions.InvalidMicrocanonicalRateError
86 method), 267
arrheniusHigh (rmgpy.kinetics.Lindemann attribute), barrier (rmgpy.statmech.HinderedRotor attribute), 249
93 benzene (rmgpy.molecule.AtomType attribute), 108
arrheniusHigh (rmgpy.kinetics.Troe attribute), 96 bimolecularThreshold (rmgpy.solver.LiquidReactor
arrheniusLow (rmgpy.kinetics.Lindemann attribute), 93 attribute), 226
arrheniusLow (rmgpy.kinetics.ThirdBody attribute), 91 bimolecularThreshold
arrheniusLow (rmgpy.kinetics.Troe attribute), 96 (rmgpy.solver.ReactionSystem attribute),
as_dict() (rmgpy.pdep.SingleExponentialDown 213
method), 153 bimolecularThreshold (rmgpy.solver.SimpleReactor
as_dict() (rmgpy.quantity.ArrayQuantity method), 183 attribute), 219
as_dict() (rmgpy.quantity.ScalarQuantity method), Bond (class in rmgpy.molecule), 116
181 bond (rmgpy.molecule.kekulize.AromaticBond attribute),
as_dict() (rmgpy.statmech.Conformer method), 253 142
as_dict() (rmgpy.statmech.HarmonicOscillator breakBond (rmgpy.molecule.AtomType attribute), 108
method), 247
as_dict() (rmgpy.statmech.HinderedRotor method), C
249 c0 (rmgpy.thermo.NASAPolynomial attribute), 264
as_dict() (rmgpy.statmech.IdealGasTranslation c1 (rmgpy.thermo.NASAPolynomial attribute), 264
method), 240 c2 (rmgpy.thermo.NASAPolynomial attribute), 264
as_dict() (rmgpy.statmech.KRotor method), 244
c3 (rmgpy.thermo.NASAPolynomial attribute), 264
as_dict() (rmgpy.statmech.LinearRotor method), 241
c4 (rmgpy.thermo.NASAPolynomial attribute), 264
as_dict() (rmgpy.statmech.NonlinearRotor method),
c5 (rmgpy.thermo.NASAPolynomial attribute), 264
243 c6 (rmgpy.thermo.NASAPolynomial attribute), 264
as_dict() (rmgpy.statmech.SphericalTopRotor calculate() (rmgpy.qm.symmetry.SymmetryJob
method), 246 method), 166
as_dict() (rmgpy.thermo.NASA method), 261
calculate_coll_limit()
as_dict() (rmgpy.thermo.NASAPolynomial method),
(rmgpy.data.kinetics.DepositoryReaction
264 method), 19
as_dict() (rmgpy.thermo.ThermoData method), 256
calculate_coll_limit()
as_dict() (rmgpy.thermo.Wilhoit method), 259
(rmgpy.data.kinetics.LibraryReaction method),
assignAtomIDs() (rmgpy.molecule.Molecule method),
45
119

Index 275
RMG-Py API Reference, Release 2.4.1

calculate_coll_limit() calculateCpInf() (rmgpy.molecule.Molecule


(rmgpy.data.kinetics.TemplateReaction method), 119
method), 64 calculateCpInf() (rmgpy.rmg.model.Species
calculate_coll_limit() (rmgpy.reaction.Reaction method), 208
method), 187 calculateCpInf() (rmgpy.species.Species method),
calculate_coll_limit() 233
(rmgpy.rmg.pdep.PDepReaction method), calculateCyclicSymmetryNumber() (in module
203 rmgpy.molecule.symmetry), 151
calculate_effective_pressure() calculateDegeneracy()
(rmgpy.solver.SimpleReactor method), 219 (rmgpy.data.kinetics.KineticsFamily method),
calculateAtomSymmetryNumber() (in module 30
rmgpy.molecule.symmetry), 150 calculateDensitiesOfStates()
calculateAxisSymmetryNumber() (in module (rmgpy.pdep.Network method), 158
rmgpy.molecule.symmetry), 150 calculateDensitiesOfStates()
calculateBondSymmetryNumber() (in module (rmgpy.rmg.pdep.PDepNetwork method),
rmgpy.molecule.symmetry), 150 200
calculateChiralityCorrection() calculateDensityOfStates()
(rmgpy.qm.gaussian.GaussianMol method), (rmgpy.pdep.Configuration method), 156
167 calculateEquilibriumRatios()
calculateChiralityCorrection() (rmgpy.pdep.Network method), 158
(rmgpy.qm.gaussian.GaussianMolPM3 calculateEquilibriumRatios()
method), 169 (rmgpy.rmg.pdep.PDepNetwork method),
calculateChiralityCorrection() 200
(rmgpy.qm.gaussian.GaussianMolPM6 calculateMicrocanonicalRateCoefficient() (in
method), 170 module rmgpy.pdep), 154
calculateChiralityCorrection() calculateMicrocanonicalRateCoefficient()
(rmgpy.qm.molecule.QMMolecule method), (rmgpy.data.kinetics.DepositoryReaction
164 method), 19
calculateChiralityCorrection() calculateMicrocanonicalRateCoefficient()
(rmgpy.qm.mopac.MopacMol method), 173 (rmgpy.data.kinetics.LibraryReaction method),
calculateChiralityCorrection() 44
(rmgpy.qm.mopac.MopacMolPM3 method), calculateMicrocanonicalRateCoefficient()
174 (rmgpy.data.kinetics.TemplateReaction
calculateChiralityCorrection() method), 63
(rmgpy.qm.mopac.MopacMolPM6 method), calculateMicrocanonicalRateCoefficient()
176 (rmgpy.reaction.Reaction method), 186
calculateChiralityCorrection() calculateMicrocanonicalRateCoefficient()
(rmgpy.qm.mopac.MopacMolPM7 method), (rmgpy.rmg.pdep.PDepReaction method), 202
177 calculateMicrocanonicalRates()
calculateCollisionEfficiency() (rmgpy.pdep.Network method), 159
(rmgpy.pdep.SingleExponentialDown method), calculateMicrocanonicalRates()
153 (rmgpy.rmg.pdep.PDepNetwork method),
calculateCollisionFrequency() 200
(rmgpy.pdep.Configuration method), 156 calculateSymmetryNumber() (in module
calculateCollisionModel() (rmgpy.pdep.Network rmgpy.molecule.symmetry), 151
method), 158 calculateSymmetryNumber()
calculateCollisionModel() (rmgpy.molecule.Molecule method), 119
(rmgpy.rmg.pdep.PDepNetwork method), calculateThermoData()
200 (rmgpy.qm.gaussian.GaussianMol method),
calculateCp0() (rmgpy.molecule.Molecule method), 167
119 calculateThermoData()
calculateCp0() (rmgpy.rmg.model.Species method), (rmgpy.qm.gaussian.GaussianMolPM3
208 method), 169
calculateCp0() (rmgpy.species.Species method), 233 calculateThermoData()

276 Index
RMG-Py API Reference, Release 2.4.1

(rmgpy.qm.gaussian.GaussianMolPM6 (rmgpy.kinetics.Wigner method), 97


method), 170 calculateTunnelingFunction()
calculateThermoData() (rmgpy.species.TransitionState method),
(rmgpy.qm.molecule.QMMolecule method), 237
164 canTST() (rmgpy.data.kinetics.DepositoryReaction
calculateThermoData() method), 20
(rmgpy.qm.mopac.MopacMol method), 173 canTST() (rmgpy.data.kinetics.LibraryReaction
calculateThermoData() method), 45
(rmgpy.qm.mopac.MopacMolPM3 method), canTST() (rmgpy.data.kinetics.TemplateReaction
174 method), 64
calculateThermoData() canTST() (rmgpy.reaction.Reaction method), 187
(rmgpy.qm.mopac.MopacMolPM6 method), canTST() (rmgpy.rmg.pdep.PDepReaction method), 203
176 changeBaseEnthalpy() (rmgpy.thermo.NASA
calculateThermoData() method), 261
(rmgpy.qm.mopac.MopacMolPM7 method), changeBaseEnthalpy()
178 (rmgpy.thermo.NASAPolynomial method),
calculateTSTRateCoefficient() 264
(rmgpy.data.kinetics.DepositoryReaction changeBaseEntropy() (rmgpy.thermo.NASA method),
method), 19 261
calculateTSTRateCoefficient() changeBaseEntropy()
(rmgpy.data.kinetics.LibraryReaction method), (rmgpy.thermo.NASAPolynomial method),
45 264
calculateTSTRateCoefficient() changeRate() (rmgpy.kinetics.Arrhenius method), 81
(rmgpy.data.kinetics.TemplateReaction changeRate() (rmgpy.kinetics.Chebyshev method), 89
method), 64 changeRate() (rmgpy.kinetics.Lindemann method), 93
calculateTSTRateCoefficient() changeRate() (rmgpy.kinetics.MultiArrhenius
(rmgpy.reaction.Reaction method), 187 method), 83
calculateTSTRateCoefficient() changeRate() (rmgpy.kinetics.MultiPDepArrhenius
(rmgpy.rmg.pdep.PDepReaction method), method), 87
203 changeRate() (rmgpy.kinetics.PDepArrhenius
calculateTSTRateCoefficients() method), 86
(rmgpy.data.kinetics.DepositoryReaction changeRate() (rmgpy.kinetics.ThirdBody method), 91
method), 19 changeRate() (rmgpy.kinetics.Troe method), 96
calculateTSTRateCoefficients() changeT0() (rmgpy.kinetics.Arrhenius method), 81
(rmgpy.data.kinetics.LibraryReaction method), charge (rmgpy.molecule.Atom attribute), 113
45 charge (rmgpy.molecule.AtomType attribute), 108
calculateTSTRateCoefficients() charge (rmgpy.molecule.GroupAtom attribute), 129
(rmgpy.data.kinetics.TemplateReaction Chebyshev (class in rmgpy.kinetics), 89
method), 64 check_collision_limit_violation()
calculateTSTRateCoefficients() (rmgpy.data.kinetics.DepositoryReaction
(rmgpy.reaction.Reaction method), 187 method), 20
calculateTSTRateCoefficients() check_collision_limit_violation()
(rmgpy.rmg.pdep.PDepReaction method), (rmgpy.data.kinetics.LibraryReaction method),
203 45
calculateTunnelingFactor() check_collision_limit_violation()
(rmgpy.kinetics.Eckart method), 99 (rmgpy.data.kinetics.TemplateReaction
calculateTunnelingFactor() method), 64
(rmgpy.kinetics.Wigner method), 97 check_collision_limit_violation()
calculateTunnelingFactor() (rmgpy.reaction.Reaction method), 187
(rmgpy.species.TransitionState method), check_collision_limit_violation()
237 (rmgpy.rmg.pdep.PDepReaction method),
calculateTunnelingFunction() 203
(rmgpy.kinetics.Eckart method), 99 check_model() (rmgpy.rmg.main.RMG method), 198
calculateTunnelingFunction() checkAllSet() (rmgpy.qm.main.QMSettings method),

Index 277
RMG-Py API Reference, Release 2.4.1

162 chemkinName (rmgpy.molecule.Element attribute), 107


checkForDuplicates() classifyBenzeneCarbons() (rmgpy.molecule.Group
(rmgpy.data.kinetics.KineticsLibrary method), method), 133
39 cleanTreeGroups() (rmgpy.data.kinetics.KineticsFamily
checkForExistingReaction() method), 31
(rmgpy.rmg.model.CoreEdgeReactionModel cleanup() (rmgpy.pdep.Configuration method), 156
method), 194 cleanup() (rmgpy.rmg.pdep.PDepNetwork method),
checkForExistingSpecies() 200
(rmgpy.rmg.model.CoreEdgeReactionModel clear() (rmgpy.rmg.main.RMG method), 198
method), 194 clearLabeledAtoms() (rmgpy.molecule.Group
checkForInChiKeyCollision() method), 133
(rmgpy.qm.qmverifier.QMVerifier method), clearLabeledAtoms() (rmgpy.molecule.Molecule
166 method), 119
checkInput() (rmgpy.rmg.main.RMG method), 198 clearSurfaceAdjustments()
checkLibraries() (rmgpy.rmg.main.RMG method), (rmgpy.rmg.model.CoreEdgeReactionModel
198 method), 194
checkPaths() (rmgpy.qm.gaussian.GaussianMol cm1 (rmgpy.thermo.NASAPolynomial attribute), 265
method), 167 cm2 (rmgpy.thermo.NASAPolynomial attribute), 265
checkPaths() (rmgpy.qm.gaussian.GaussianMolPM3 coeffs (rmgpy.kinetics.Chebyshev attribute), 89
method), 169 coeffs (rmgpy.thermo.NASAPolynomial attribute), 265
checkPaths() (rmgpy.qm.gaussian.GaussianMolPM6 colliderEfficiencies (rmgpy.solver.SimpleReactor
method), 171 attribute), 219
checkPaths() (rmgpy.qm.main.QMCalculator CollisionError, 266
method), 163 comment (rmgpy.data.kinetics.DepositoryReaction at-
checkPaths() (rmgpy.qm.molecule.QMMolecule tribute), 20
method), 164 comment (rmgpy.data.kinetics.LibraryReaction at-
checkPaths() (rmgpy.qm.mopac.MopacMol method), tribute), 45
173 comment (rmgpy.data.kinetics.TemplateReaction at-
checkPaths() (rmgpy.qm.mopac.MopacMolPM3 tribute), 64
method), 174 comment (rmgpy.kinetics.Arrhenius attribute), 81
checkPaths() (rmgpy.qm.mopac.MopacMolPM6 comment (rmgpy.kinetics.Chebyshev attribute), 89
method), 176 comment (rmgpy.kinetics.KineticsData attribute), 80
checkPaths() (rmgpy.qm.mopac.MopacMolPM7 comment (rmgpy.kinetics.Lindemann attribute), 94
method), 178 comment (rmgpy.kinetics.MultiArrhenius attribute), 83
checkReady() (rmgpy.qm.gaussian.GaussianMol comment (rmgpy.kinetics.MultiPDepArrhenius at-
method), 167 tribute), 88
checkReady() (rmgpy.qm.gaussian.GaussianMolPM3 comment (rmgpy.kinetics.PDepArrhenius attribute), 86
method), 169 comment (rmgpy.kinetics.PDepKineticsData attribute),
checkReady() (rmgpy.qm.gaussian.GaussianMolPM6 84
method), 171 comment (rmgpy.kinetics.ThirdBody attribute), 91
checkReady() (rmgpy.qm.main.QMCalculator comment (rmgpy.kinetics.Troe attribute), 96
method), 163 comment (rmgpy.reaction.Reaction attribute), 187
checkReady() (rmgpy.qm.molecule.QMMolecule comment (rmgpy.rmg.pdep.PDepReaction attribute), 203
method), 164 comment (rmgpy.thermo.NASA attribute), 261
checkReady() (rmgpy.qm.mopac.MopacMol method), comment (rmgpy.thermo.NASAPolynomial attribute), 265
173 comment (rmgpy.thermo.ThermoData attribute), 256
checkReady() (rmgpy.qm.mopac.MopacMolPM3 comment (rmgpy.thermo.Wilhoit attribute), 259
method), 174 compute_atom_distance (in module
checkReady() (rmgpy.qm.mopac.MopacMolPM6 rmgpy.molecule.pathfinder), 144
method), 176 compute_network_variables()
checkReady() (rmgpy.qm.mopac.MopacMolPM7 (rmgpy.solver.LiquidReactor method), 226
method), 178 compute_network_variables()
ChemicallySignificantEigenvaluesError, 266 (rmgpy.solver.ReactionSystem method), 213
ChemkinError, 266 compute_network_variables()

278 Index
RMG-Py API Reference, Release 2.4.1

(rmgpy.solver.SimpleReactor method), 219 (rmgpy.data.kinetics.KineticsLibrary method),


computeGroupAdditivityThermo() 40
(rmgpy.data.thermo.ThermoDatabase method), convertInitialKeysToSpeciesObjects()
69 (rmgpy.solver.LiquidReactor method), 226
computeRateDerivative() convertInitialKeysToSpeciesObjects()
(rmgpy.solver.LiquidReactor method), 226 (rmgpy.solver.SimpleReactor method), 219
computeRateDerivative() convolve() (in module rmgpy.statmech.schrodinger),
(rmgpy.solver.ReactionSystem method), 213 251
computeRateDerivative() convolveBS() (in module
(rmgpy.solver.SimpleReactor method), 219 rmgpy.statmech.schrodinger), 251
Configuration (class in rmgpy.pdep), 155 convolveBSSR() (in module
Conformer (class in rmgpy.statmech), 252 rmgpy.statmech.schrodinger), 251
conformer (rmgpy.rmg.model.Species attribute), 209 coordinates (rmgpy.statmech.Conformer attribute),
conformer (rmgpy.species.Species attribute), 233 253
conformer (rmgpy.species.TransitionState attribute), coords (rmgpy.molecule.Atom attribute), 114
237 copy() (arkane.PressureDependenceJob method), 10
connectivity1 (rmgpy.molecule.Atom attribute), 113 copy() (rmgpy.data.kinetics.DepositoryReaction
connectivity1 (rmgpy.molecule.graph.Vertex at- method), 20
tribute), 101 copy() (rmgpy.data.kinetics.LibraryReaction method),
connectivity1 (rmgpy.molecule.GroupAtom at- 45
tribute), 129 copy() (rmgpy.data.kinetics.TemplateReaction method),
connectivity2 (rmgpy.molecule.Atom attribute), 113 64
connectivity2 (rmgpy.molecule.graph.Vertex at- copy() (rmgpy.molecule.Atom method), 114
tribute), 101 copy() (rmgpy.molecule.Bond method), 116
connectivity2 (rmgpy.molecule.GroupAtom at- copy() (rmgpy.molecule.graph.Edge method), 102
tribute), 129 copy() (rmgpy.molecule.graph.Graph method), 103
connectivity3 (rmgpy.molecule.Atom attribute), 114 copy() (rmgpy.molecule.graph.Vertex method), 101
connectivity3 (rmgpy.molecule.graph.Vertex at- copy() (rmgpy.molecule.Group method), 133
tribute), 101 copy() (rmgpy.molecule.GroupAtom method), 129
connectivity3 (rmgpy.molecule.GroupAtom at- copy() (rmgpy.molecule.GroupBond method), 131
tribute), 129 copy() (rmgpy.molecule.Molecule method), 119
connectTheDots() (rmgpy.molecule.Molecule copy() (rmgpy.quantity.ArrayQuantity method), 183
method), 119 copy() (rmgpy.quantity.ScalarQuantity method), 181
constantVolume (rmgpy.solver.LiquidReactor at- copy() (rmgpy.reaction.Reaction method), 187
tribute), 226 copy() (rmgpy.rmg.model.Species method), 209
constantVolume (rmgpy.solver.SimpleReactor at- copy() (rmgpy.rmg.pdep.PDepReaction method), 203
tribute), 219 copy() (rmgpy.species.Species method), 233
constSPCIndices (rmgpy.solver.LiquidReactor at- copy() (rmgpy.thermo.Wilhoit method), 259
tribute), 226 copyAndMap() (rmgpy.molecule.graph.Graph method),
constSPCNames (rmgpy.solver.LiquidReactor attribute), 103
226 copyAndMap() (rmgpy.molecule.Group method), 133
containsLabeledAtom() (rmgpy.molecule.Group copyAndMap() (rmgpy.molecule.Molecule method), 119
method), 133 copyData() (rmgpy.data.thermo.ThermoGroups
containsLabeledAtom() (rmgpy.molecule.Molecule method), 74
method), 119 CoreEdgeReactionModel (class in rmgpy.rmg.model),
containsSurfaceSite() (rmgpy.molecule.Group 193
method), 133 CoreError, 266
containsSurfaceSite() (rmgpy.molecule.Molecule coreReactionRates (rmgpy.solver.LiquidReactor at-
method), 119 tribute), 226
containsSurfaceSite() (rmgpy.rmg.model.Species coreReactionRates (rmgpy.solver.ReactionSystem at-
method), 209 tribute), 213
containsSurfaceSite() (rmgpy.species.Species coreReactionRates (rmgpy.solver.SimpleReactor at-
method), 233 tribute), 219
convertDuplicatesToMulti() coreSpeciesConcentrations

Index 279
RMG-Py API Reference, Release 2.4.1

(rmgpy.solver.LiquidReactor attribute), 226 method), 173


coreSpeciesConcentrations createGeometry() (rmgpy.qm.mopac.MopacMolPM3
(rmgpy.solver.ReactionSystem attribute), method), 174
213 createGeometry() (rmgpy.qm.mopac.MopacMolPM6
coreSpeciesConcentrations method), 176
(rmgpy.solver.SimpleReactor attribute), 219 createGeometry() (rmgpy.qm.mopac.MopacMolPM7
coreSpeciesConsumptionRates method), 178
(rmgpy.solver.LiquidReactor attribute), 226 creationIteration (rmgpy.rmg.model.Species
coreSpeciesConsumptionRates attribute), 209
(rmgpy.solver.ReactionSystem attribute), creationIteration (rmgpy.species.Species attribute),
213 233
coreSpeciesConsumptionRates crossValidate() (rmgpy.data.kinetics.KineticsFamily
(rmgpy.solver.SimpleReactor attribute), 220 method), 31
coreSpeciesProductionRates crossValidateOld() (rmgpy.data.kinetics.KineticsFamily
(rmgpy.solver.LiquidReactor attribute), 227 method), 31
coreSpeciesProductionRates
(rmgpy.solver.ReactionSystem attribute), D
213 Database (class in rmgpy.data.base), 16
coreSpeciesProductionRates DatabaseError, 266
(rmgpy.solver.SimpleReactor attribute), 220 debugRDKitMol (in module rmgpy.molecule.converter),
coreSpeciesRates (rmgpy.solver.LiquidReactor at- 146
tribute), 227 decrementBond (rmgpy.molecule.AtomType attribute),
coreSpeciesRates (rmgpy.solver.ReactionSystem at- 108
tribute), 213 decrementLonePair (rmgpy.molecule.AtomType at-
coreSpeciesRates (rmgpy.solver.SimpleReactor at- tribute), 109
tribute), 220 decrementLonePairs() (rmgpy.molecule.Atom
correctBindingEnergy() method), 114
(rmgpy.data.thermo.ThermoDatabase method), decrementOrder() (rmgpy.molecule.Bond method),
69 116
countBonds() (rmgpy.molecule.GroupAtom method), decrementRadical (rmgpy.molecule.AtomType at-
129 tribute), 109
countInternalRotors() (rmgpy.molecule.Molecule decrementRadical() (rmgpy.molecule.Atom method),
method), 119 114
covRadius (rmgpy.molecule.Element attribute), 107 degeneracy (rmgpy.data.kinetics.DepositoryReaction
Cp0 (rmgpy.thermo.NASA attribute), 261 attribute), 20
Cp0 (rmgpy.thermo.NASAPolynomial attribute), 264 degeneracy (rmgpy.data.kinetics.LibraryReaction at-
Cp0 (rmgpy.thermo.ThermoData attribute), 255 tribute), 45
Cp0 (rmgpy.thermo.Wilhoit attribute), 258 degeneracy (rmgpy.data.kinetics.TemplateReaction at-
Cpdata (rmgpy.thermo.ThermoData attribute), 255 tribute), 64
CpInf (rmgpy.thermo.NASA attribute), 261 degeneracy (rmgpy.reaction.Reaction attribute), 187
CpInf (rmgpy.thermo.NASAPolynomial attribute), 264 degeneracy (rmgpy.rmg.pdep.PDepReaction attribute),
CpInf (rmgpy.thermo.ThermoData attribute), 255 203
CpInf (rmgpy.thermo.Wilhoit attribute), 258 degeneracy (rmgpy.species.TransitionState attribute),
createAndConnectAtom() (rmgpy.molecule.Group 237
method), 133 degreeP (rmgpy.kinetics.Chebyshev attribute), 89
createGeometry() (rmgpy.qm.gaussian.GaussianMol degreeT (rmgpy.kinetics.Chebyshev attribute), 90
method), 167 deleteHydrogens() (rmgpy.molecule.Molecule
createGeometry() (rmgpy.qm.gaussian.GaussianMolPM3 method), 119
method), 169 densStates (rmgpy.pdep.Configuration attribute), 156
createGeometry() (rmgpy.qm.gaussian.GaussianMolPM6 DependencyError, 266
method), 171 DepositoryReaction (class in rmgpy.data.kinetics),
createGeometry() (rmgpy.qm.molecule.QMMolecule 19
method), 164 descendants() (rmgpy.data.base.Database method),
createGeometry() (rmgpy.qm.mopac.MopacMol 17

280 Index
RMG-Py API Reference, Release 2.4.1

descendants() (rmgpy.data.kinetics.KineticsDepository method), 171


method), 28 determinePointGroup()
descendants() (rmgpy.data.kinetics.KineticsFamily (rmgpy.qm.molecule.QMMolecule method),
method), 31 164
descendants() (rmgpy.data.kinetics.KineticsGroups determinePointGroup()
method), 37 (rmgpy.qm.mopac.MopacMol method), 173
descendants() (rmgpy.data.kinetics.KineticsLibrary determinePointGroup()
method), 40 (rmgpy.qm.mopac.MopacMolPM3 method),
descendants() (rmgpy.data.kinetics.KineticsRules 174
method), 42 determinePointGroup()
descendants() (rmgpy.data.statmech.StatmechDepository (rmgpy.qm.mopac.MopacMolPM6 method),
method), 52 176
descendants() (rmgpy.data.statmech.StatmechGroups determinePointGroup()
method), 59 (rmgpy.qm.mopac.MopacMolPM7 method),
descendants() (rmgpy.data.statmech.StatmechLibrary 178
method), 61 DirectFit (class in rmgpy.data.statmechfit), 55
descendants() (rmgpy.data.thermo.ThermoDepository discrepancy() (rmgpy.kinetics.Arrhenius method), 81
method), 72 discrepancy() (rmgpy.kinetics.Chebyshev method), 90
descendants() (rmgpy.data.thermo.ThermoGroups discrepancy() (rmgpy.kinetics.KineticsData method),
method), 74 80
descendants() (rmgpy.data.thermo.ThermoLibrary discrepancy() (rmgpy.kinetics.Lindemann method),
method), 77 94
descendTree() (rmgpy.data.base.Database method), discrepancy() (rmgpy.kinetics.MultiArrhenius
17 method), 83
descendTree() (rmgpy.data.kinetics.KineticsDepository discrepancy() (rmgpy.kinetics.MultiPDepArrhenius
method), 28 method), 88
descendTree() (rmgpy.data.kinetics.KineticsFamily discrepancy() (rmgpy.kinetics.PDepArrhenius
method), 31 method), 86
descendTree() (rmgpy.data.kinetics.KineticsGroups discrepancy() (rmgpy.kinetics.PDepKineticsData
method), 37 method), 84
descendTree() (rmgpy.data.kinetics.KineticsLibrary discrepancy() (rmgpy.kinetics.ThirdBody method), 92
method), 40 discrepancy() (rmgpy.kinetics.Troe method), 96
descendTree() (rmgpy.data.kinetics.KineticsRules discrepancy() (rmgpy.thermo.NASA method), 261
method), 42 discrepancy() (rmgpy.thermo.NASAPolynomial
descendTree() (rmgpy.data.statmech.StatmechDepository method), 265
method), 52 discrepancy() (rmgpy.thermo.ThermoData method),
descendTree() (rmgpy.data.statmech.StatmechGroups 256
method), 59 discrepancy() (rmgpy.thermo.Wilhoit method), 259
descendTree() (rmgpy.data.statmech.StatmechLibrary distributeTreeDistances()
method), 61 (rmgpy.data.kinetics.KineticsFamily method),
descendTree() (rmgpy.data.thermo.ThermoDepository 31
method), 72 double_possible (rmgpy.molecule.kekulize.AromaticBond
descendTree() (rmgpy.data.thermo.ThermoGroups attribute), 142
method), 74 double_required (rmgpy.molecule.kekulize.AromaticBond
descendTree() (rmgpy.data.thermo.ThermoLibrary attribute), 142
method), 76 draw() (arkane.KineticsJob method), 7
determinePointGroup() draw() (arkane.PressureDependenceJob method), 10
(rmgpy.qm.gaussian.GaussianMol method), draw() (rmgpy.data.kinetics.DepositoryReaction
167 method), 20
determinePointGroup() draw() (rmgpy.data.kinetics.LibraryReaction method),
(rmgpy.qm.gaussian.GaussianMolPM3 45
method), 169 draw() (rmgpy.data.kinetics.TemplateReaction method),
determinePointGroup() 64
(rmgpy.qm.gaussian.GaussianMolPM6 draw() (rmgpy.molecule.draw.MoleculeDrawer

Index 281
RMG-Py API Reference, Release 2.4.1

method), 151 efficiencies (rmgpy.kinetics.PDepKineticsData at-


draw() (rmgpy.molecule.draw.ReactionDrawer method), tribute), 84
151 efficiencies (rmgpy.kinetics.ThirdBody attribute), 92
draw() (rmgpy.molecule.Group method), 134 efficiencies (rmgpy.kinetics.Troe attribute), 96
draw() (rmgpy.molecule.Molecule method), 119 Element (class in rmgpy.molecule), 106
draw() (rmgpy.reaction.Reaction method), 187 element (rmgpy.molecule.Atom attribute), 114
draw() (rmgpy.rmg.pdep.PDepReaction method), 203 element_count_from_conformer()
duplicate (rmgpy.data.kinetics.DepositoryReaction at- (arkane.ThermoJob method), 11
tribute), 20 elementary_high_p (rmgpy.data.kinetics.DepositoryReaction
duplicate (rmgpy.data.kinetics.LibraryReaction attribute), 20
attribute), 45 elementary_high_p (rmgpy.data.kinetics.LibraryReaction
duplicate (rmgpy.data.kinetics.TemplateReaction at- attribute), 45
tribute), 65 elementary_high_p (rmgpy.data.kinetics.TemplateReaction
duplicate (rmgpy.reaction.Reaction attribute), 188 attribute), 65
duplicate (rmgpy.rmg.pdep.PDepReaction attribute), elementary_high_p (rmgpy.reaction.Reaction at-
204 tribute), 188
dydt0 (rmgpy.solver.LiquidReactor attribute), 227 elementary_high_p (rmgpy.rmg.pdep.PDepReaction
dydt0 (rmgpy.solver.ReactionSystem attribute), 213 attribute), 204
dydt0 (rmgpy.solver.SimpleReactor attribute), 220 elementCount (rmgpy.molecule.Group attribute), 134
ElementError, 266
E Elist (rmgpy.pdep.Configuration attribute), 155
E0 (rmgpy.pdep.Configuration attribute), 155 endo_dof (rmgpy.molecule.kekulize.AromaticBond at-
E0 (rmgpy.statmech.Conformer attribute), 252 tribute), 143
E0 (rmgpy.thermo.NASA attribute), 261 endo_dof (rmgpy.molecule.kekulize.AromaticRing at-
E0 (rmgpy.thermo.NASAPolynomial attribute), 264 tribute), 143
E0 (rmgpy.thermo.ThermoData attribute), 255 energies (rmgpy.statmech.HinderedRotor attribute),
E0 (rmgpy.thermo.Wilhoit attribute), 258 249
E0_prod (rmgpy.kinetics.Eckart attribute), 99 energyTransferModel (rmgpy.rmg.model.Species at-
E0_reac (rmgpy.kinetics.Eckart attribute), 99 tribute), 209
E0_TS (rmgpy.kinetics.Eckart attribute), 99 energyTransferModel (rmgpy.species.Species at-
Ea (rmgpy.kinetics.Arrhenius attribute), 81 tribute), 234
Eckart (class in rmgpy.kinetics), 98 enlarge() (rmgpy.rmg.model.CoreEdgeReactionModel
Edge (class in rmgpy.molecule.graph), 102 method), 194
edgeReactionRates (rmgpy.solver.LiquidReactor at- ensure_species() (rmgpy.data.kinetics.DepositoryReaction
tribute), 227 method), 20
edgeReactionRates (rmgpy.solver.ReactionSystem at- ensure_species() (rmgpy.data.kinetics.LibraryReaction
tribute), 213 method), 46
edgeReactionRates (rmgpy.solver.SimpleReactor at- ensure_species() (rmgpy.data.kinetics.TemplateReaction
tribute), 220 method), 65
edges (rmgpy.molecule.Atom attribute), 114 ensure_species() (rmgpy.reaction.Reaction method),
edges (rmgpy.molecule.graph.Vertex attribute), 101 188
edges (rmgpy.molecule.GroupAtom attribute), 129 ensure_species() (rmgpy.rmg.pdep.PDepReaction
edgeSpeciesRates (rmgpy.solver.LiquidReactor at- method), 204
tribute), 227 Entry (class in rmgpy.data.base), 24
edgeSpeciesRates (rmgpy.solver.ReactionSystem at- enumerate_bonds() (rmgpy.molecule.Molecule
tribute), 213 method), 120
edgeSpeciesRates (rmgpy.solver.SimpleReactor at- equals() (rmgpy.quantity.ArrayQuantity method), 183
tribute), 220 equals() (rmgpy.quantity.ScalarQuantity method), 181
efficiencies (rmgpy.kinetics.Chebyshev attribute), 90 equivalent() (rmgpy.molecule.Atom method), 114
efficiencies (rmgpy.kinetics.Lindemann attribute), 94 equivalent() (rmgpy.molecule.AtomType method),
efficiencies (rmgpy.kinetics.MultiPDepArrhenius at- 109
tribute), 88 equivalent() (rmgpy.molecule.Bond method), 116
efficiencies (rmgpy.kinetics.PDepArrhenius at- equivalent() (rmgpy.molecule.graph.Edge method),
tribute), 86 102

282 Index
RMG-Py API Reference, Release 2.4.1

equivalent() (rmgpy.molecule.graph.Vertex method), (rmgpy.data.kinetics.KineticsFamily method),


101 31
equivalent() (rmgpy.molecule.GroupAtom method), extractSourceFromComments()
129 (rmgpy.data.thermo.ThermoDatabase method),
equivalent() (rmgpy.molecule.GroupBond method), 69
131
estimateKinetics() (rmgpy.data.kinetics.KineticsRules F
method), 42 failureKeys (rmgpy.qm.gaussian.Gaussian attribute),
estimateKineticsUsingGroupAdditivity() 167
(rmgpy.data.kinetics.KineticsFamily method), failureKeys (rmgpy.qm.mopac.Mopac attribute), 172
31 feasible() (rmgpy.molecule.vf2.VF2 method), 106
estimateKineticsUsingGroupAdditivity() fillKineticsRulesByAveragingUp()
(rmgpy.data.kinetics.KineticsGroups method), (rmgpy.data.kinetics.KineticsFamily method),
37 32
estimateKineticsUsingRateRules() fillRulesByAveragingUp()
(rmgpy.data.kinetics.KineticsFamily method), (rmgpy.data.kinetics.KineticsRules method), 42
31 find_adj_lone_pair_multiple_bond_delocalization_paths
estimateRadicalThermoViaHBI() (in module rmgpy.molecule.pathfinder), 144
(rmgpy.data.thermo.ThermoDatabase method), find_adj_lone_pair_radical_delocalization_paths
69 (in module rmgpy.molecule.pathfinder), 145
estimateThermoViaGroupAdditivity() find_adj_lone_pair_radical_multiple_bond_delocalization_
(rmgpy.data.thermo.ThermoDatabase method), (in module rmgpy.molecule.pathfinder), 145
69 find_allyl_delocalization_paths (in module
evalExt() (rmgpy.data.kinetics.KineticsFamily rmgpy.molecule.pathfinder), 146
method), 31 find_allyl_end_with_charge (in module
evaluate() (rmgpy.data.statmechfit.DirectFit method), rmgpy.molecule.pathfinder), 146
55 find_butadiene (in module
evaluate() (rmgpy.data.statmechfit.PseudoFit rmgpy.molecule.pathfinder), 146
method), 57 find_butadiene_end_with_charge (in module
evaluate() (rmgpy.data.statmechfit.PseudoRotorFit rmgpy.molecule.pathfinder), 146
method), 56 find_H_bonds() (rmgpy.molecule.Molecule method),
execute() (arkane.Arkane method), 7 120
execute() (arkane.KineticsJob method), 7 find_lone_pair_multiple_bond_paths (in module
execute() (arkane.PressureDependenceJob method), rmgpy.molecule.pathfinder), 146
10 find_N5dc_radical_delocalization_paths (in
execute() (arkane.StatMechJob method), 11 module rmgpy.molecule.pathfinder), 144
execute() (arkane.ThermoJob method), 11 find_shortest_path (in module
execute() (rmgpy.rmg.main.RMG method), 198 rmgpy.molecule.pathfinder), 146
exo_dof (rmgpy.molecule.kekulize.AromaticBond findIsomorphism() (rmgpy.molecule.graph.Graph
attribute), 143 method), 103
exo_dof (rmgpy.molecule.kekulize.AromaticRing at- findIsomorphism() (rmgpy.molecule.Group method),
tribute), 143 134
explicitlyAllowed (rmgpy.rmg.model.Species findIsomorphism() (rmgpy.molecule.Molecule
attribute), 209 method), 120
explicitlyAllowed (rmgpy.species.Species attribute), findIsomorphism() (rmgpy.molecule.vf2.VF2
234 method), 106
exploreIsomer() (rmgpy.rmg.pdep.PDepNetwork findSubgraphIsomorphisms()
method), 200 (rmgpy.molecule.graph.Graph method),
extendNode() (rmgpy.data.kinetics.KineticsFamily 103
method), 31 findSubgraphIsomorphisms()
extractSourceFromComments() (rmgpy.molecule.Group method), 134
(rmgpy.data.kinetics.KineticsDatabase findSubgraphIsomorphisms()
method), 25 (rmgpy.molecule.Molecule method), 120
extractSourceFromComments()

Index 283
RMG-Py API Reference, Release 2.4.1

findSubgraphIsomorphisms() fixDiffusionLimitedA()
(rmgpy.molecule.vf2.VF2 method), 106 (rmgpy.rmg.pdep.PDepReaction method),
fingerprint (rmgpy.molecule.Molecule attribute), 120 204
fingerprint (rmgpy.rmg.model.Species attribute), 209 ForbiddenStructureException, 266
fingerprint (rmgpy.species.Species attribute), 234 formBond (rmgpy.molecule.AtomType attribute), 109
finish() (rmgpy.rmg.main.RMG method), 198 fourier (rmgpy.statmech.HinderedRotor attribute), 250
fitCosinePotentialToData() frequencies (rmgpy.statmech.HarmonicOscillator at-
(rmgpy.statmech.HinderedRotor method), tribute), 248
249 frequency (rmgpy.kinetics.Eckart attribute), 99
fitFourierPotentialToData() frequency (rmgpy.kinetics.Wigner attribute), 97
(rmgpy.statmech.HinderedRotor method), frequency (rmgpy.species.TransitionState attribute),
250 237
fitInterpolationModel() frequency (rmgpy.statmech.HinderedRotor attribute),
(arkane.PressureDependenceJob method), 250
10 fromAdjacencyList() (in module
fitInterpolationModels() rmgpy.molecule.adjlist), 150
(arkane.PressureDependenceJob method), fromAdjacencyList() (rmgpy.molecule.Group
10 method), 134
fitStatmechDirect() (in module fromAdjacencyList() (rmgpy.molecule.Molecule
rmgpy.data.statmechfit), 54 method), 120
fitStatmechPseudo() (in module fromAdjacencyList() (rmgpy.rmg.model.Species
rmgpy.data.statmechfit), 55 method), 209
fitStatmechPseudoRotors() (in module fromAdjacencyList() (rmgpy.species.Species
rmgpy.data.statmechfit), 55 method), 234
fitStatmechToHeatCapacity() (in module fromAugmentedInChI (in module
rmgpy.data.statmechfit), 54 rmgpy.molecule.translator), 147
fitToData() (rmgpy.kinetics.Arrhenius method), 81 fromAugmentedInChI() (rmgpy.molecule.Molecule
fitToData() (rmgpy.kinetics.Chebyshev method), 90 method), 120
fitToData() (rmgpy.kinetics.PDepArrhenius method), fromInChI (in module rmgpy.molecule.translator), 147
86 fromInChI() (rmgpy.molecule.Molecule method), 120
fitToData() (rmgpy.thermo.Wilhoit method), 259 fromOBMol (in module rmgpy.molecule.converter), 146
fitToDataForConstantB() (rmgpy.thermo.Wilhoit fromRDKitMol (in module rmgpy.molecule.converter),
method), 259 146
fixBarrierHeight() (rmgpy.data.kinetics.DepositoryReaction
fromSMARTS (in module rmgpy.molecule.translator), 147
method), 20 fromSMARTS() (rmgpy.molecule.Molecule method), 120
fixBarrierHeight() (rmgpy.data.kinetics.LibraryReaction
fromSMILES (in module rmgpy.molecule.translator), 147
method), 46 fromSMILES() (rmgpy.molecule.Molecule method), 121
fixBarrierHeight() (rmgpy.data.kinetics.TemplateReaction
fromSMILES() (rmgpy.rmg.model.Species method), 209
method), 65 fromSMILES() (rmgpy.species.Species method), 234
fixBarrierHeight() (rmgpy.reaction.Reaction fromXYZ() (rmgpy.molecule.Molecule method), 121
method), 188
fixBarrierHeight() (rmgpy.rmg.pdep.PDepReaction G
method), 204 Gaussian (class in rmgpy.qm.gaussian), 167
fixDiffusionLimitedA() GaussianLog (class in arkane.gaussian), 4
(rmgpy.data.kinetics.DepositoryReaction GaussianMol (class in rmgpy.qm.gaussian), 167
method), 20 GaussianMolPM3 (class in rmgpy.qm.gaussian), 169
fixDiffusionLimitedA() GaussianMolPM6 (class in rmgpy.qm.gaussian), 170
(rmgpy.data.kinetics.LibraryReaction method), generate3dTS() (rmgpy.data.kinetics.DepositoryReaction
46 method), 20
fixDiffusionLimitedA() generate3dTS() (rmgpy.data.kinetics.LibraryReaction
(rmgpy.data.kinetics.TemplateReaction method), 46
method), 65 generate3dTS() (rmgpy.data.kinetics.TemplateReaction
fixDiffusionLimitedA() (rmgpy.reaction.Reaction method), 65
method), 188

284 Index
RMG-Py API Reference, Release 2.4.1

generate3dTS() (rmgpy.reaction.Reaction method), (rmgpy.data.kinetics.KineticsDatabase


188 method), 25
generate3dTS() (rmgpy.rmg.pdep.PDepReaction generate_reactions_from_families()
method), 204 (rmgpy.data.kinetics.KineticsDatabase
generate_adj_lone_pair_multiple_bond_resonance_structures
method), 25
(in module rmgpy.molecule.resonance), 140 generate_reactions_from_libraries()
generate_adj_lone_pair_radical_multiple_bond_resonance _structures
(rmgpy.data.kinetics.KineticsDatabase
(in module rmgpy.molecule.resonance), 140 method), 26
generate_adj_lone_pair_radical_resonance_structures
generate_reactions_from_library()
(in module rmgpy.molecule.resonance), 140 (rmgpy.data.kinetics.KineticsDatabase
generate_allyl_delocalization_resonance_structures method), 26
(in module rmgpy.molecule.resonance), 140 generate_resonance_structures (in module
_ _ _
generate aromatic resonance structure (in rmgpy.molecule.resonance), 141
module rmgpy.molecule.resonance), 140 generate_resonance_structures()
_ _ _
generate aryne resonance structures (in mod- (rmgpy.molecule.Molecule method), 121
ule rmgpy.molecule.resonance), 141 generate_resonance_structures()
generate_aug_inchi() (rmgpy.rmg.model.Species (rmgpy.rmg.model.Species method), 209
method), 209 generate_resonance_structures()
generate_aug_inchi() (rmgpy.species.Species (rmgpy.species.Species method), 234
method), 234 generate_species_indices()
generate_clar_structures (in module (rmgpy.solver.LiquidReactor method), 227
rmgpy.molecule.resonance), 141 generate_species_indices()
generate_H_bonded_structures() (rmgpy.solver.ReactionSystem method), 214
(rmgpy.molecule.Molecule method), 121 generate_species_indices()
generate_high_p_limit_kinetics() (rmgpy.solver.SimpleReactor method), 220
(rmgpy.data.kinetics.LibraryReaction method), generateCanteraFiles() (rmgpy.rmg.main.RMG
46 method), 198
generate_isomorphic_resonance_structures (in generateCollisionMatrix()
module rmgpy.molecule.resonance), 141 (rmgpy.pdep.Configuration method), 156
generate_kekule_structure (in module generateCollisionMatrix()
rmgpy.molecule.resonance), 141 (rmgpy.pdep.SingleExponentialDown method),
generate_lone_pair_multiple_bond_resonance_structures 153
(in module rmgpy.molecule.resonance), 141 generateEnergyTransferModel()
generate_N5dc_radical_resonance_structures (rmgpy.rmg.model.Species method), 209
(in module rmgpy.molecule.resonance), 140 generateEnergyTransferModel()
generate_optimal_aromatic_resonance_structures (rmgpy.species.Species method), 234
(in module rmgpy.molecule.resonance), 141 generateFrequencies()
generate_rate_coefficients() (rmgpy.data.statmech.GroupFrequencies
(rmgpy.solver.LiquidReactor method), 227 method), 25
generate_rate_coefficients() generateFullMEMatrix() (in module
(rmgpy.solver.SimpleReactor method), 220 rmgpy.pdep.me), 160
generate_reactant_product_indices() generateGroupAdditivityValues()
(rmgpy.solver.LiquidReactor method), 227 (rmgpy.data.kinetics.KineticsGroups method),
generate_reactant_product_indices() 37
(rmgpy.solver.ReactionSystem method), 213 generateKinetics() (arkane.KineticsJob method), 7
generate_reactant_product_indices() generateKinetics() (rmgpy.rmg.model.CoreEdgeReactionModel
(rmgpy.solver.SimpleReactor method), 220 method), 194
generate_reaction_indices() generateOldLibraryEntry()
(rmgpy.solver.LiquidReactor method), 227 (rmgpy.data.statmech.StatmechGroups
generate_reaction_indices() method), 59
(rmgpy.solver.ReactionSystem method), 214 generateOldLibraryEntry()
generate_reaction_indices() (rmgpy.data.statmech.StatmechLibrary
(rmgpy.solver.SimpleReactor method), 220 method), 61
generate_reactions() generateOldLibraryEntry()

Index 285
RMG-Py API Reference, Release 2.4.1

(rmgpy.data.thermo.ThermoGroups method), method), 173


74 generateQMData() (rmgpy.qm.mopac.MopacMolPM3
generateOldLibraryEntry() method), 175
(rmgpy.data.thermo.ThermoLibrary method), generateQMData() (rmgpy.qm.mopac.MopacMolPM6
77 method), 176
generateOldTree() (rmgpy.data.base.Database generateQMData() (rmgpy.qm.mopac.MopacMolPM7
method), 17 method), 178
generateOldTree() (rmgpy.data.kinetics.KineticsDepository
generateRDKitGeometries()
method), 28 (rmgpy.qm.molecule.Geometry method),
generateOldTree() (rmgpy.data.kinetics.KineticsFamily 163
method), 32 generateReactions()
generateOldTree() (rmgpy.data.kinetics.KineticsGroups (rmgpy.data.kinetics.KineticsFamily method),
method), 38 32
generateOldTree() (rmgpy.data.kinetics.KineticsLibrarygenerateReverseRateCoefficient()
method), 40 (rmgpy.data.kinetics.DepositoryReaction
generateOldTree() (rmgpy.data.kinetics.KineticsRules method), 21
method), 42 generateReverseRateCoefficient()
generateOldTree() (rmgpy.data.statmech.StatmechDepository (rmgpy.data.kinetics.LibraryReaction method),
method), 53 46
generateOldTree() (rmgpy.data.statmech.StatmechGroups generateReverseRateCoefficient()
method), 59 (rmgpy.data.kinetics.TemplateReaction
generateOldTree() (rmgpy.data.statmech.StatmechLibrary method), 65
method), 61 generateReverseRateCoefficient()
generateOldTree() (rmgpy.data.thermo.ThermoDepository (rmgpy.reaction.Reaction method), 188
method), 72 generateReverseRateCoefficient()
generateOldTree() (rmgpy.data.thermo.ThermoGroups (rmgpy.rmg.pdep.PDepReaction method),
method), 75 204
generateOldTree() (rmgpy.data.thermo.ThermoLibrary generateStatMech() (rmgpy.rmg.model.Species
method), 77 method), 209
generatePairs() (rmgpy.data.kinetics.DepositoryReaction
generateStatMech() (rmgpy.species.Species method),
method), 21 234
generatePairs() (rmgpy.data.kinetics.LibraryReaction generateTemperatureList()
method), 46 (arkane.PressureDependenceJob method),
generatePairs() (rmgpy.data.kinetics.TemplateReaction 10
method), 65 generateThermo() (arkane.ThermoJob method), 11
generatePairs() (rmgpy.reaction.Reaction method), generateThermo() (rmgpy.rmg.model.CoreEdgeReactionModel
188 method), 194
generatePairs() (rmgpy.rmg.pdep.PDepReaction generateThermoData()
method), 204 (rmgpy.qm.gaussian.GaussianMol method),
generatePressureList() 168
(arkane.PressureDependenceJob method), generateThermoData()
10 (rmgpy.qm.gaussian.GaussianMolPM3
generateProductTemplate() method), 169
(rmgpy.data.kinetics.KineticsFamily method), generateThermoData()
32 (rmgpy.qm.gaussian.GaussianMolPM6
generateQMData() (rmgpy.qm.gaussian.GaussianMol method), 171
method), 168 generateThermoData()
generateQMData() (rmgpy.qm.gaussian.GaussianMolPM3 (rmgpy.qm.molecule.QMMolecule method),
method), 169 164
generateQMData() (rmgpy.qm.gaussian.GaussianMolPM6 generateThermoData() (rmgpy.qm.mopac.MopacMol
method), 171 method), 173
generateQMData() (rmgpy.qm.molecule.QMMolecule generateThermoData()
method), 164 (rmgpy.qm.mopac.MopacMolPM3 method),
generateQMData() (rmgpy.qm.mopac.MopacMol 175

286 Index
RMG-Py API Reference, Release 2.4.1

generateThermoData() get_optical_isomers_and_symmetry_number()
(rmgpy.qm.mopac.MopacMolPM6 method), (arkane.qchem.QChemLog method), 5
176 get_rate_filtered_reactions()
generateThermoData() (rmgpy.rmg.pdep.PDepNetwork method),
(rmgpy.qm.mopac.MopacMolPM7 method), 201
178 get_reduced_mass() (rmgpy.data.kinetics.DepositoryReaction
generateTransportData() method), 22
(rmgpy.rmg.model.Species method), 209 get_reduced_mass() (rmgpy.data.kinetics.LibraryReaction
generateTransportData() (rmgpy.species.Species method), 47
method), 234 get_reduced_mass() (rmgpy.data.kinetics.TemplateReaction
generateTree() (rmgpy.data.kinetics.KineticsFamily method), 66
method), 32 get_reduced_mass() (rmgpy.reaction.Reaction
generic (rmgpy.molecule.AtomType attribute), 109 method), 189
generic_visit() (arkane.output.PrettifyVisitor get_reduced_mass() (rmgpy.rmg.pdep.PDepReaction
method), 8 method), 205
Geometry (class in rmgpy.qm.molecule), 163 get_species_index() (rmgpy.solver.LiquidReactor
get_bond_string() (rmgpy.molecule.Bond method), method), 227
117 get_species_index() (rmgpy.solver.ReactionSystem
get_constSPCIndices() method), 214
(rmgpy.solver.LiquidReactor method), 227 get_species_index() (rmgpy.solver.SimpleReactor
get_descriptor() (rmgpy.molecule.Atom method), method), 220
114 get_thermo_data_from_ml()
get_edges_in_cycle() (rmgpy.data.thermo.ThermoDatabase method),
(rmgpy.molecule.graph.Graph method), 70
104 get_threshold_rate_constants()
get_edges_in_cycle() (rmgpy.molecule.Group (rmgpy.solver.LiquidReactor method), 227
method), 136 get_threshold_rate_constants()
get_edges_in_cycle() (rmgpy.molecule.Molecule (rmgpy.solver.SimpleReactor method), 220
method), 123 getActiveModes() (rmgpy.statmech.Conformer
get_element_count() (rmgpy.molecule.Group method), 253
method), 136 getAllCycles() (rmgpy.molecule.graph.Graph
get_element_count() (rmgpy.molecule.Molecule method), 103
method), 124 getAllCycles() (rmgpy.molecule.Group method), 134
get_energy_filtered_reactions() getAllCycles() (rmgpy.molecule.Molecule method),
(rmgpy.rmg.pdep.PDepNetwork method), 121
201 getAllCyclesOfSize()
get_mean_sigma_and_epsilon() (rmgpy.molecule.graph.Graph method),
(rmgpy.data.kinetics.DepositoryReaction 103
method), 22 getAllCyclesOfSize() (rmgpy.molecule.Group
get_mean_sigma_and_epsilon() method), 134
(rmgpy.data.kinetics.LibraryReaction method), getAllCyclesOfSize() (rmgpy.molecule.Molecule
47 method), 121
get_mean_sigma_and_epsilon() getAllCyclicVertices()
(rmgpy.data.kinetics.TemplateReaction (rmgpy.molecule.graph.Graph method),
method), 66 103
get_mean_sigma_and_epsilon() getAllCyclicVertices() (rmgpy.molecule.Group
(rmgpy.reaction.Reaction method), 189 method), 134
get_mean_sigma_and_epsilon() getAllCyclicVertices() (rmgpy.molecule.Molecule
(rmgpy.rmg.pdep.PDepReaction method), method), 121
205 getAllEdges() (rmgpy.molecule.graph.Graph
get_optical_isomers_and_symmetry_number() method), 103
(arkane.gaussian.GaussianLog method), 4 getAllEdges() (rmgpy.molecule.Group method), 134
get_optical_isomers_and_symmetry_number() getAllEdges() (rmgpy.molecule.Molecule method),
(arkane.molpro.MolproLog method), 6 121

Index 287
RMG-Py API Reference, Release 2.4.1

getAllPolycyclicVertices() method), 96
(rmgpy.molecule.graph.Graph method), getCenterOfMass() (rmgpy.statmech.Conformer
104 method), 253
getAllPolycyclicVertices() getChargeSpan() (rmgpy.molecule.Molecule method),
(rmgpy.molecule.Group method), 134 122
getAllPolycyclicVertices() getConversionFactorFromSI()
(rmgpy.molecule.Molecule method), 121 (rmgpy.quantity.ArrayQuantity method),
getAllRules() (rmgpy.data.kinetics.KineticsRules 183
method), 42 getConversionFactorFromSI()
getAllSimpleCyclesOfSize() (rmgpy.quantity.ScalarQuantity method),
(rmgpy.molecule.graph.Graph method), 181
104 getConversionFactorFromSItoCmMolS()
getAllSimpleCyclesOfSize() (rmgpy.quantity.ArrayQuantity method),
(rmgpy.molecule.Group method), 134 183
getAllSimpleCyclesOfSize() getConversionFactorFromSItoCmMolS()
(rmgpy.molecule.Molecule method), 121 (rmgpy.quantity.ScalarQuantity method),
getAllSpecies() (rmgpy.pdep.Network method), 159 181
getAllSpecies() (rmgpy.rmg.pdep.PDepNetwork getConversionFactorToSI()
method), 201 (rmgpy.quantity.ArrayQuantity method),
getAllThermoData() (rmgpy.data.thermo.ThermoDatabase 183
method), 70 getConversionFactorToSI()
getAlpha() (rmgpy.pdep.SingleExponentialDown (rmgpy.quantity.ScalarQuantity method),
method), 154 181
getAromaticRings() (rmgpy.molecule.Molecule getCrudeMolFilePath()
method), 121 (rmgpy.qm.molecule.Geometry method),
getAtomType() (in module rmgpy.molecule), 110 163
getAugmentedInChI() (rmgpy.rmg.model.Species getDensityOfStates() (in module
method), 209 rmgpy.statmech.schrodinger), 251
getAugmentedInChI() (rmgpy.species.Species getDensityOfStates() (rmgpy.rmg.model.Species
method), 234 method), 209
getBackboneRoots() (rmgpy.data.kinetics.KineticsFamilygetDensityOfStates() (rmgpy.species.Species
method), 32 method), 234
getBDE() (rmgpy.molecule.Bond method), 116 getDensityOfStates()
getBond() (rmgpy.molecule.Group method), 135 (rmgpy.species.TransitionState method),
getBond() (rmgpy.molecule.Molecule method), 121 237
getBondOrdersForAtom() (rmgpy.molecule.Atom getDensityOfStates() (rmgpy.statmech.Conformer
method), 114 method), 253
getBonds() (rmgpy.molecule.Group method), 135 getDensityOfStates()
getBonds() (rmgpy.molecule.Molecule method), 122 (rmgpy.statmech.HarmonicOscillator method),
getCanteraEfficiencies() 248
(rmgpy.kinetics.Chebyshev method), 90 getDensityOfStates()
getCanteraEfficiencies() (rmgpy.statmech.HinderedRotor method),
(rmgpy.kinetics.Lindemann method), 94 250
getCanteraEfficiencies() getDensityOfStates()
(rmgpy.kinetics.MultiPDepArrhenius method), (rmgpy.statmech.IdealGasTranslation method),
88 240
getCanteraEfficiencies() getDensityOfStates() (rmgpy.statmech.KRotor
(rmgpy.kinetics.PDepArrhenius method), method), 244
86 getDensityOfStates() (rmgpy.statmech.LinearRotor
getCanteraEfficiencies() method), 242
(rmgpy.kinetics.PDepKineticsData method), 84 getDensityOfStates()
getCanteraEfficiencies() (rmgpy.statmech.NonlinearRotor method),
(rmgpy.kinetics.ThirdBody method), 92 243
getCanteraEfficiencies() (rmgpy.kinetics.Troe getDensityOfStates()

288 Index
RMG-Py API Reference, Release 2.4.1

(rmgpy.statmech.SphericalTopRotor method), method), 21


246 getEnthalpiesOfReaction()
getDeterministicSmallestSetOfSmallestRings() (rmgpy.data.kinetics.LibraryReaction method),
(rmgpy.molecule.Molecule method), 122 46
getDisparateRings() (rmgpy.molecule.graph.Graph getEnthalpiesOfReaction()
method), 104 (rmgpy.data.kinetics.TemplateReaction
getDisparateRings() (rmgpy.molecule.Group method), 65
method), 135 getEnthalpiesOfReaction()
getDisparateRings() (rmgpy.molecule.Molecule (rmgpy.reaction.Reaction method), 188
method), 122 getEnthalpiesOfReaction()
getEdge() (rmgpy.molecule.graph.Graph method), 104 (rmgpy.rmg.pdep.PDepReaction method),
getEdge() (rmgpy.molecule.Group method), 135 204
getEdge() (rmgpy.molecule.Molecule method), 122 getEnthalpy() (in module
getEdges() (rmgpy.molecule.graph.Graph method), rmgpy.statmech.schrodinger), 251
104 getEnthalpy() (rmgpy.pdep.Configuration method),
getEdges() (rmgpy.molecule.Group method), 135 156
getEdges() (rmgpy.molecule.Molecule method), 122 getEnthalpy() (rmgpy.rmg.model.Species method),
getEffectiveColliderEfficiencies() 210
(rmgpy.kinetics.Chebyshev method), 90 getEnthalpy() (rmgpy.species.Species method), 234
getEffectiveColliderEfficiencies() getEnthalpy() (rmgpy.species.TransitionState
(rmgpy.kinetics.Lindemann method), 94 method), 237
getEffectiveColliderEfficiencies() getEnthalpy() (rmgpy.statmech.Conformer method),
(rmgpy.kinetics.MultiPDepArrhenius method), 253
88 getEnthalpy() (rmgpy.statmech.HarmonicOscillator
getEffectiveColliderEfficiencies() method), 248
(rmgpy.kinetics.PDepArrhenius method), getEnthalpy() (rmgpy.statmech.HinderedRotor
86 method), 250
getEffectiveColliderEfficiencies() getEnthalpy() (rmgpy.statmech.IdealGasTranslation
(rmgpy.kinetics.PDepKineticsData method), 84 method), 240
getEffectiveColliderEfficiencies() getEnthalpy() (rmgpy.statmech.KRotor method), 244
(rmgpy.kinetics.ThirdBody method), 92 getEnthalpy() (rmgpy.statmech.LinearRotor method),
getEffectiveColliderEfficiencies() 242
(rmgpy.kinetics.Troe method), 96 getEnthalpy() (rmgpy.statmech.NonlinearRotor
getEffectivePressure() (rmgpy.kinetics.Chebyshev method), 243
method), 90 getEnthalpy() (rmgpy.statmech.SphericalTopRotor
getEffectivePressure() method), 246
(rmgpy.kinetics.Lindemann method), 94 getEnthalpy() (rmgpy.thermo.NASA method), 261
getEffectivePressure() getEnthalpy() (rmgpy.thermo.NASAPolynomial
(rmgpy.kinetics.MultiPDepArrhenius method), method), 265
88 getEnthalpy() (rmgpy.thermo.ThermoData method),
getEffectivePressure() 256
(rmgpy.kinetics.PDepArrhenius method), getEnthalpy() (rmgpy.thermo.Wilhoit method), 259
86 getEnthalpyOfReaction()
getEffectivePressure() (rmgpy.data.kinetics.DepositoryReaction
(rmgpy.kinetics.PDepKineticsData method), 84 method), 21
getEffectivePressure() (rmgpy.kinetics.ThirdBody getEnthalpyOfReaction()
method), 92 (rmgpy.data.kinetics.LibraryReaction method),
getEffectivePressure() (rmgpy.kinetics.Troe 46
method), 96 getEnthalpyOfReaction()
getElement() (in module rmgpy.molecule), 107 (rmgpy.data.kinetics.TemplateReaction
getEndRoots() (rmgpy.data.kinetics.KineticsFamily method), 65
method), 32 getEnthalpyOfReaction() (rmgpy.reaction.Reaction
getEnthalpiesOfReaction() method), 188
(rmgpy.data.kinetics.DepositoryReaction getEnthalpyOfReaction()

Index 289
RMG-Py API Reference, Release 2.4.1

(rmgpy.rmg.pdep.PDepReaction method), getEntropy() (rmgpy.statmech.HinderedRotor


204 method), 250
getEntries() (rmgpy.data.kinetics.KineticsRules getEntropy() (rmgpy.statmech.IdealGasTranslation
method), 42 method), 240
getEntriesToSave() (rmgpy.data.base.Database getEntropy() (rmgpy.statmech.KRotor method), 244
method), 17 getEntropy() (rmgpy.statmech.LinearRotor method),
getEntriesToSave() (rmgpy.data.kinetics.KineticsDepository 242
method), 28 getEntropy() (rmgpy.statmech.NonlinearRotor
getEntriesToSave() (rmgpy.data.kinetics.KineticsFamily method), 243
method), 33 getEntropy() (rmgpy.statmech.SphericalTopRotor
getEntriesToSave() (rmgpy.data.kinetics.KineticsGroups method), 246
method), 38 getEntropy() (rmgpy.thermo.NASA method), 261
getEntriesToSave() (rmgpy.data.kinetics.KineticsLibrary
getEntropy() (rmgpy.thermo.NASAPolynomial
method), 40 method), 265
getEntriesToSave() (rmgpy.data.kinetics.KineticsRules getEntropy() (rmgpy.thermo.ThermoData method),
method), 42 256
getEntriesToSave() (rmgpy.data.statmech.StatmechDepository
getEntropy() (rmgpy.thermo.Wilhoit method), 259
method), 53 getEntropyOfReaction()
getEntriesToSave() (rmgpy.data.statmech.StatmechGroups (rmgpy.data.kinetics.DepositoryReaction
method), 59 method), 21
getEntriesToSave() (rmgpy.data.statmech.StatmechLibrary
getEntropyOfReaction()
method), 61 (rmgpy.data.kinetics.LibraryReaction method),
getEntriesToSave() (rmgpy.data.thermo.ThermoDepository 47
method), 72 getEntropyOfReaction()
getEntriesToSave() (rmgpy.data.thermo.ThermoGroups (rmgpy.data.kinetics.TemplateReaction
method), 75 method), 66
getEntriesToSave() (rmgpy.data.thermo.ThermoLibrarygetEntropyOfReaction() (rmgpy.reaction.Reaction
method), 77 method), 189
getEntropiesOfReaction() getEntropyOfReaction()
(rmgpy.data.kinetics.DepositoryReaction (rmgpy.rmg.pdep.PDepReaction method),
method), 21 205
getEntropiesOfReaction() getEquilibriumConstant()
(rmgpy.data.kinetics.LibraryReaction method), (rmgpy.data.kinetics.DepositoryReaction
46 method), 21
getEntropiesOfReaction() getEquilibriumConstant()
(rmgpy.data.kinetics.TemplateReaction (rmgpy.data.kinetics.LibraryReaction method),
method), 66 47
getEntropiesOfReaction() getEquilibriumConstant()
(rmgpy.reaction.Reaction method), 188 (rmgpy.data.kinetics.TemplateReaction
getEntropiesOfReaction() method), 66
(rmgpy.rmg.pdep.PDepReaction method), getEquilibriumConstant()
205 (rmgpy.reaction.Reaction method), 189
getEntropy() (in module getEquilibriumConstant()
rmgpy.statmech.schrodinger), 252 (rmgpy.rmg.pdep.PDepReaction method),
getEntropy() (rmgpy.pdep.Configuration method), 205
156 getEquilibriumConstants()
getEntropy() (rmgpy.rmg.model.Species method), 210 (rmgpy.data.kinetics.DepositoryReaction
getEntropy() (rmgpy.species.Species method), 234 method), 21
getEntropy() (rmgpy.species.TransitionState method), getEquilibriumConstants()
237 (rmgpy.data.kinetics.LibraryReaction method),
getEntropy() (rmgpy.statmech.Conformer method), 47
253 getEquilibriumConstants()
getEntropy() (rmgpy.statmech.HarmonicOscillator (rmgpy.data.kinetics.TemplateReaction
method), 248 method), 66

290 Index
RMG-Py API Reference, Release 2.4.1

getEquilibriumConstants() getFreeEnergy() (rmgpy.statmech.Conformer


(rmgpy.reaction.Reaction method), 189 method), 253
getEquilibriumConstants() getFreeEnergy() (rmgpy.thermo.NASA method), 261
(rmgpy.rmg.pdep.PDepReaction method), getFreeEnergy() (rmgpy.thermo.NASAPolynomial
205 method), 265
getExtensionEdge() (rmgpy.data.kinetics.KineticsFamilygetFreeEnergy() (rmgpy.thermo.ThermoData
method), 33 method), 256
getExtensions() (rmgpy.molecule.Group method), getFreeEnergy() (rmgpy.thermo.Wilhoit method), 259
135 getFreeEnergyOfReaction()
getFeatures() (rmgpy.molecule.AtomType method), (rmgpy.data.kinetics.DepositoryReaction
109 method), 21
getFilePath() (rmgpy.qm.gaussian.GaussianMol getFreeEnergyOfReaction()
method), 168 (rmgpy.data.kinetics.LibraryReaction method),
getFilePath() (rmgpy.qm.gaussian.GaussianMolPM3 47
method), 169 getFreeEnergyOfReaction()
getFilePath() (rmgpy.qm.gaussian.GaussianMolPM6 (rmgpy.data.kinetics.TemplateReaction
method), 171 method), 66
getFilePath() (rmgpy.qm.molecule.Geometry getFreeEnergyOfReaction()
method), 163 (rmgpy.reaction.Reaction method), 189
getFilePath() (rmgpy.qm.molecule.QMMolecule getFreeEnergyOfReaction()
method), 164 (rmgpy.rmg.pdep.PDepReaction method),
getFilePath() (rmgpy.qm.mopac.MopacMol method), 205
173 getFrequency() (rmgpy.statmech.HinderedRotor
getFilePath() (rmgpy.qm.mopac.MopacMolPM3 method), 250
method), 175 getFrequencyGroups()
getFilePath() (rmgpy.qm.mopac.MopacMolPM6 (rmgpy.data.statmech.StatmechGroups
method), 176 method), 59
getFilePath() (rmgpy.qm.mopac.MopacMolPM7 getHamiltonian() (rmgpy.statmech.HinderedRotor
method), 178 method), 250
getFormula() (rmgpy.molecule.Molecule method), 122 getHeatCapacity() (in module
getForwardReactionForFamilyEntry() rmgpy.statmech.schrodinger), 252
(rmgpy.data.kinetics.KineticsDatabase getHeatCapacity() (rmgpy.pdep.Configuration
method), 26 method), 156
getFreeEnergiesOfReaction() getHeatCapacity() (rmgpy.rmg.model.Species
(rmgpy.data.kinetics.DepositoryReaction method), 210
method), 21 getHeatCapacity() (rmgpy.species.Species method),
getFreeEnergiesOfReaction() 234
(rmgpy.data.kinetics.LibraryReaction method), getHeatCapacity() (rmgpy.species.TransitionState
47 method), 237
getFreeEnergiesOfReaction() getHeatCapacity() (rmgpy.statmech.Conformer
(rmgpy.data.kinetics.TemplateReaction method), 253
method), 66 getHeatCapacity() (rmgpy.statmech.HarmonicOscillator
getFreeEnergiesOfReaction() method), 248
(rmgpy.reaction.Reaction method), 189 getHeatCapacity() (rmgpy.statmech.HinderedRotor
getFreeEnergiesOfReaction() method), 250
(rmgpy.rmg.pdep.PDepReaction method), getHeatCapacity() (rmgpy.statmech.IdealGasTranslation
205 method), 240
getFreeEnergy() (rmgpy.pdep.Configuration method), getHeatCapacity() (rmgpy.statmech.KRotor method),
156 244
getFreeEnergy() (rmgpy.rmg.model.Species method), getHeatCapacity() (rmgpy.statmech.LinearRotor
210 method), 242
getFreeEnergy() (rmgpy.species.Species method), 234 getHeatCapacity() (rmgpy.statmech.NonlinearRotor
getFreeEnergy() (rmgpy.species.TransitionState method), 243
method), 237 getHeatCapacity() (rmgpy.statmech.SphericalTopRotor

Index 291
RMG-Py API Reference, Release 2.4.1

method), 246 getLayeringIndices()


getHeatCapacity() (rmgpy.thermo.NASA method), (rmgpy.solver.ReactionSystem method), 214
261 getLayeringIndices() (rmgpy.solver.SimpleReactor
getHeatCapacity() (rmgpy.thermo.NASAPolynomial method), 220
method), 265 getLeakBranchingRatios()
getHeatCapacity() (rmgpy.thermo.ThermoData (rmgpy.rmg.pdep.PDepNetwork method),
method), 256 201
getHeatCapacity() (rmgpy.thermo.Wilhoit method), getLeakCoefficient()
259 (rmgpy.rmg.pdep.PDepNetwork method),
getInChiKeyAug() (rmgpy.qm.gaussian.GaussianMol 201
method), 168 getLevelDegeneracy()
getInChiKeyAug() (rmgpy.qm.gaussian.GaussianMolPM3 (rmgpy.statmech.HinderedRotor method),
method), 169 250
getInChiKeyAug() (rmgpy.qm.gaussian.GaussianMolPM6 getLevelDegeneracy() (rmgpy.statmech.KRotor
method), 171 method), 244
getInChiKeyAug() (rmgpy.qm.molecule.QMMolecule getLevelDegeneracy() (rmgpy.statmech.LinearRotor
method), 165 method), 242
getInChiKeyAug() (rmgpy.qm.mopac.MopacMol getLevelDegeneracy()
method), 173 (rmgpy.statmech.SphericalTopRotor method),
getInChiKeyAug() (rmgpy.qm.mopac.MopacMolPM3 246
method), 175 getLevelEnergy() (rmgpy.statmech.HinderedRotor
getInChiKeyAug() (rmgpy.qm.mopac.MopacMolPM6 method), 250
method), 176 getLevelEnergy() (rmgpy.statmech.KRotor method),
getInChiKeyAug() (rmgpy.qm.mopac.MopacMolPM7 244
method), 178 getLevelEnergy() (rmgpy.statmech.LinearRotor
getInternalReducedMomentOfInertia() method), 242
(rmgpy.statmech.Conformer method), 253 getLevelEnergy() (rmgpy.statmech.SphericalTopRotor
getKinetics() (rmgpy.data.kinetics.KineticsFamily method), 246
method), 33 getLibraries() (arkane.Arkane method), 7
getKineticsForTemplate() getLibraryReactions()
(rmgpy.data.kinetics.KineticsFamily method), (rmgpy.data.kinetics.KineticsLibrary method),
33 40
getKineticsFromDepository() getLists() (rmgpy.rmg.model.CoreEdgeReactionModel
(rmgpy.data.kinetics.KineticsFamily method), method), 194
33 getMaxCycleOverlap()
getLabeledAtom() (rmgpy.molecule.Group method), (rmgpy.molecule.graph.Graph method),
135 104
getLabeledAtom() (rmgpy.molecule.Molecule getMaxCycleOverlap() (rmgpy.molecule.Group
method), 122 method), 135
getLabeledAtoms() (rmgpy.molecule.Group method), getMaxCycleOverlap() (rmgpy.molecule.Molecule
135 method), 122
getLabeledAtoms() (rmgpy.molecule.Molecule getMaximumLeakSpecies()
method), 122 (rmgpy.rmg.pdep.PDepNetwork method),
getLabeledReactantsAndProducts() 201
(rmgpy.data.kinetics.KineticsFamily method), getModelSize() (rmgpy.rmg.model.CoreEdgeReactionModel
33 method), 194
getLargestRing() (rmgpy.molecule.graph.Graph getMolecularWeight() (rmgpy.molecule.Molecule
method), 104 method), 122
getLargestRing() (rmgpy.molecule.Group method), getMolFilePathForCalculation()
135 (rmgpy.qm.gaussian.GaussianMol method),
getLargestRing() (rmgpy.molecule.Molecule 168
method), 122 getMolFilePathForCalculation()
getLayeringIndices() (rmgpy.solver.LiquidReactor (rmgpy.qm.gaussian.GaussianMolPM3
method), 227 method), 169

292 Index
RMG-Py API Reference, Release 2.4.1

getMolFilePathForCalculation() method), 168


(rmgpy.qm.gaussian.GaussianMolPM6 getParser() (rmgpy.qm.gaussian.GaussianMolPM3
method), 171 method), 169
getMolFilePathForCalculation() getParser() (rmgpy.qm.gaussian.GaussianMolPM6
(rmgpy.qm.molecule.QMMolecule method), method), 171
165 getParser() (rmgpy.qm.mopac.Mopac method), 172
getMolFilePathForCalculation() getParser() (rmgpy.qm.mopac.MopacMol method),
(rmgpy.qm.mopac.MopacMol method), 173 173
getMolFilePathForCalculation() getParser() (rmgpy.qm.mopac.MopacMolPM3
(rmgpy.qm.mopac.MopacMolPM3 method), method), 175
175 getParser() (rmgpy.qm.mopac.MopacMolPM6
getMolFilePathForCalculation() method), 177
(rmgpy.qm.mopac.MopacMolPM6 method), getParser() (rmgpy.qm.mopac.MopacMolPM7
176 method), 178
getMolFilePathForCalculation() getPartitionFunction() (in module
(rmgpy.qm.mopac.MopacMolPM7 method), rmgpy.statmech.schrodinger), 252
178 getPartitionFunction() (rmgpy.rmg.model.Species
getMomentOfInertiaTensor() method), 210
(rmgpy.statmech.Conformer method), 253 getPartitionFunction() (rmgpy.species.Species
getMonocyclicRings() method), 234
(rmgpy.molecule.graph.Graph method), getPartitionFunction()
104 (rmgpy.species.TransitionState method),
getMonocyclicRings() (rmgpy.molecule.Group 237
method), 135 getPartitionFunction()
getMonocyclicRings() (rmgpy.molecule.Molecule (rmgpy.statmech.Conformer method), 254
method), 122 getPartitionFunction()
getNetCharge() (rmgpy.molecule.Group method), 135 (rmgpy.statmech.HarmonicOscillator method),
getNetCharge() (rmgpy.molecule.Molecule method), 248
123 getPartitionFunction()
getNthNeighbor() (rmgpy.molecule.Molecule (rmgpy.statmech.HinderedRotor method),
method), 123 250
getNumAtoms() (rmgpy.molecule.Molecule method), getPartitionFunction()
123 (rmgpy.statmech.IdealGasTranslation method),
getNumberDegreesOfFreedom() 240
(rmgpy.statmech.Conformer method), 254 getPartitionFunction() (rmgpy.statmech.KRotor
getNumberOfAtoms() (arkane.gaussian.GaussianLog method), 245
method), 4 getPartitionFunction()
getNumberOfAtoms() (arkane.molpro.MolproLog (rmgpy.statmech.LinearRotor method), 242
method), 6 getPartitionFunction()
getNumberOfAtoms() (arkane.qchem.QChemLog (rmgpy.statmech.NonlinearRotor method),
method), 5 243
getOrderNum() (rmgpy.molecule.Bond method), 116 getPartitionFunction()
getOrderNum() (rmgpy.molecule.GroupBond method), (rmgpy.statmech.SphericalTopRotor method),
131 246
getOrderStr() (rmgpy.molecule.Bond method), 116 getPolycyclicRings()
getOrderStr() (rmgpy.molecule.GroupBond method), (rmgpy.molecule.graph.Graph method),
131 104
getOtherVertex() (rmgpy.molecule.Bond method), getPolycyclicRings() (rmgpy.molecule.Group
116 method), 135
getOtherVertex() (rmgpy.molecule.graph.Edge getPolycyclicRings() (rmgpy.molecule.Molecule
method), 102 method), 123
getOtherVertex() (rmgpy.molecule.GroupBond getPossibleStructures()
method), 131 (rmgpy.data.base.LogicOr method), 50
getParser() (rmgpy.qm.gaussian.GaussianMol getPotential() (rmgpy.statmech.HinderedRotor

Index 293
RMG-Py API Reference, Release 2.4.1

method), 250 getReactionTemplate()


getPrincipalMomentsOfInertia() (rmgpy.data.kinetics.KineticsGroups method),
(rmgpy.statmech.Conformer method), 254 38
getRadicalAtoms() (rmgpy.molecule.Molecule getReactionTemplateLabels()
method), 123 (rmgpy.data.kinetics.KineticsFamily method),
getRadicalCount() (rmgpy.molecule.Molecule 34
method), 123 getRefinedMolFilePath()
getRateCoefficient() (rmgpy.qm.molecule.Geometry method),
(rmgpy.data.kinetics.DepositoryReaction 163
method), 21 getRelevantCycles() (rmgpy.molecule.graph.Graph
getRateCoefficient() method), 104
(rmgpy.data.kinetics.LibraryReaction method), getRelevantCycles() (rmgpy.molecule.Group
47 method), 135
getRateCoefficient() getRelevantCycles() (rmgpy.molecule.Molecule
(rmgpy.data.kinetics.TemplateReaction method), 123
method), 66 getResonanceHybrid() (rmgpy.rmg.model.Species
getRateCoefficient() (rmgpy.kinetics.Arrhenius method), 210
method), 81 getResonanceHybrid() (rmgpy.species.Species
getRateCoefficient() (rmgpy.kinetics.Chebyshev method), 234
method), 90 getReverse() (rmgpy.data.kinetics.ReactionRecipe
getRateCoefficient() (rmgpy.kinetics.KineticsData method), 51
method), 80 getRingGroupsFromComments()
getRateCoefficient() (rmgpy.kinetics.Lindemann (rmgpy.data.thermo.ThermoDatabase method),
method), 94 70
getRateCoefficient() getRootTemplate() (rmgpy.data.kinetics.KineticsFamily
(rmgpy.kinetics.MultiArrhenius method), method), 34
83 getRule() (rmgpy.data.kinetics.KineticsRules method),
getRateCoefficient() 42
(rmgpy.kinetics.MultiPDepArrhenius method), getSingletCarbeneCount()
88 (rmgpy.molecule.Molecule method), 123
getRateCoefficient() getSmallestSetOfSmallestRings()
(rmgpy.kinetics.PDepArrhenius method), (rmgpy.molecule.graph.Graph method),
86 104
getRateCoefficient() getSmallestSetOfSmallestRings()
(rmgpy.kinetics.PDepKineticsData method), 84 (rmgpy.molecule.Group method), 136
getRateCoefficient() (rmgpy.kinetics.ThirdBody getSmallestSetOfSmallestRings()
method), 92 (rmgpy.molecule.Molecule method), 123
getRateCoefficient() (rmgpy.kinetics.Troe method), getSource() (rmgpy.data.kinetics.DepositoryReaction
96 method), 21
getRateCoefficient() (rmgpy.reaction.Reaction getSource() (rmgpy.data.kinetics.LibraryReaction
method), 189 method), 47
getRateCoefficient() getSource() (rmgpy.data.kinetics.TemplateReaction
(rmgpy.rmg.pdep.PDepReaction method), method), 66
205 getSource() (rmgpy.rmg.pdep.PDepReaction method),
getRateRule() (rmgpy.data.kinetics.KineticsFamily 205
method), 33 getSourcesForTemplate()
getReactionMatches() (rmgpy.data.kinetics.KineticsFamily method),
(rmgpy.data.kinetics.KineticsFamily method), 34
33 getSpecies() (rmgpy.data.base.Database method), 17
getReactionPairs() (rmgpy.data.kinetics.KineticsFamilygetSpecies() (rmgpy.data.kinetics.KineticsDepository
method), 34 method), 28
getReactionTemplate() getSpecies() (rmgpy.data.kinetics.KineticsFamily
(rmgpy.data.kinetics.KineticsFamily method), method), 34
34 getSpecies() (rmgpy.data.kinetics.KineticsGroups

294 Index
RMG-Py API Reference, Release 2.4.1

method), 38 235
getSpecies() (rmgpy.data.kinetics.KineticsLibrary getSumOfStates() (rmgpy.species.TransitionState
method), 40 method), 237
getSpecies() (rmgpy.data.kinetics.KineticsRules getSumOfStates() (rmgpy.statmech.Conformer
method), 42 method), 254
getSpecies() (rmgpy.data.statmech.StatmechDepository getSumOfStates() (rmgpy.statmech.HarmonicOscillator
method), 53 method), 248
getSpecies() (rmgpy.data.statmech.StatmechGroups getSumOfStates() (rmgpy.statmech.HinderedRotor
method), 59 method), 250
getSpecies() (rmgpy.data.statmech.StatmechLibrary getSumOfStates() (rmgpy.statmech.IdealGasTranslation
method), 61 method), 240
getSpecies() (rmgpy.data.thermo.ThermoDepository getSumOfStates() (rmgpy.statmech.KRotor method),
method), 72 245
getSpecies() (rmgpy.data.thermo.ThermoGroups getSumOfStates() (rmgpy.statmech.LinearRotor
method), 75 method), 242
getSpecies() (rmgpy.data.thermo.ThermoLibrary getSumOfStates() (rmgpy.statmech.NonlinearRotor
method), 77 method), 243
getSpeciesIdentifier() (in module getSumOfStates() (rmgpy.statmech.SphericalTopRotor
rmgpy.chemkin), 14 method), 246
getStatmechData() (rmgpy.data.statmech.StatmechDatabase
getSurfaceRateCoefficient()
method), 51 (rmgpy.data.kinetics.DepositoryReaction
getStatmechData() (rmgpy.data.statmech.StatmechGroups method), 22
method), 59 getSurfaceRateCoefficient()
getStatmechDataFromDepository() (rmgpy.data.kinetics.LibraryReaction method),
(rmgpy.data.statmech.StatmechDatabase 47
method), 51 getSurfaceRateCoefficient()
getStatmechDataFromGroups() (rmgpy.data.kinetics.TemplateReaction
(rmgpy.data.statmech.StatmechDatabase method), 66
method), 51 getSurfaceRateCoefficient()
getStatmechDataFromLibrary() (rmgpy.reaction.Reaction method), 189
(rmgpy.data.statmech.StatmechDatabase getSurfaceRateCoefficient()
method), 51 (rmgpy.rmg.pdep.PDepReaction method),
getStoichiometricCoefficient() 205
(rmgpy.data.kinetics.DepositoryReaction getSymmetricTopRotors()
method), 22 (rmgpy.statmech.Conformer method), 254
getStoichiometricCoefficient() getSymmetryNumber() (rmgpy.molecule.Molecule
(rmgpy.data.kinetics.LibraryReaction method), method), 123
47 getSymmetryNumber() (rmgpy.rmg.model.Species
getStoichiometricCoefficient() method), 210
(rmgpy.data.kinetics.TemplateReaction getSymmetryNumber() (rmgpy.species.Species
method), 66 method), 235
getStoichiometricCoefficient() getThermoData() (rmgpy.data.thermo.ThermoDatabase
(rmgpy.reaction.Reaction method), 189 method), 70
getStoichiometricCoefficient() getThermoData() (rmgpy.qm.main.QMCalculator
(rmgpy.rmg.pdep.PDepReaction method), method), 163
205 getThermoData() (rmgpy.rmg.model.Species method),
getStoichiometryMatrix() 210
(rmgpy.rmg.model.CoreEdgeReactionModel getThermoData() (rmgpy.species.Species method), 235
method), 195 getThermoDataForSurfaceSpecies()
getSumOfStates() (in module (rmgpy.data.thermo.ThermoDatabase method),
rmgpy.statmech.schrodinger), 252 70
getSumOfStates() (rmgpy.rmg.model.Species getThermoDataFromDepository()
method), 210 (rmgpy.data.thermo.ThermoDatabase method),
getSumOfStates() (rmgpy.species.Species method), 70

Index 295
RMG-Py API Reference, Release 2.4.1

getThermoDataFromGroups() (rmgpy.quantity.ScalarQuantity method),


(rmgpy.data.thermo.ThermoDatabase method), 181
70 getURL() (rmgpy.data.kinetics.DepositoryReaction
getThermoDataFromLibraries() method), 22
(rmgpy.data.thermo.ThermoDatabase method), getURL() (rmgpy.data.kinetics.LibraryReaction
70 method), 47
getThermoDataFromLibrary() getURL() (rmgpy.data.kinetics.TemplateReaction
(rmgpy.data.thermo.ThermoDatabase method), method), 66
70 getURL() (rmgpy.molecule.Molecule method), 123
getThermoFilePath() getURL() (rmgpy.reaction.Reaction method), 189
(rmgpy.qm.gaussian.GaussianMol method), getURL() (rmgpy.rmg.pdep.PDepReaction method), 205
168 getValue() (rmgpy.quantity.ArrayQuantity method),
getThermoFilePath() 183
(rmgpy.qm.gaussian.GaussianMolPM3 getValue() (rmgpy.quantity.ScalarQuantity method),
method), 170 181
getThermoFilePath() getw0() (rmgpy.data.kinetics.KineticsFamily method),
(rmgpy.qm.gaussian.GaussianMolPM6 34
method), 171 Graph (class in rmgpy.molecule.graph), 103
getThermoFilePath() groundStateDegeneracy (rmgpy.qm.qmdata.QMData
(rmgpy.qm.molecule.QMMolecule method), attribute), 165
165 Group (class in rmgpy.molecule), 132
getThermoFilePath() (rmgpy.qm.mopac.MopacMol GroupAtom (class in rmgpy.molecule), 128
method), 173 GroupBond (class in rmgpy.molecule), 131
getThermoFilePath() GroupFrequencies (class in rmgpy.data.statmech), 25
(rmgpy.qm.mopac.MopacMolPM3 method),
175 H
getThermoFilePath() H0 (rmgpy.thermo.Wilhoit attribute), 258
(rmgpy.qm.mopac.MopacMolPM6 method), H298 (rmgpy.thermo.ThermoData attribute), 255
177 HarmonicOscillator (class in rmgpy.statmech), 247
getThermoFilePath() harmonicOscillator_d_heatCapacity_d_freq()
(rmgpy.qm.mopac.MopacMolPM7 method), (in module rmgpy.data.statmechfit), 55
178 harmonicOscillator_heatCapacity() (in module
getTopLevelGroups() rmgpy.data.statmechfit), 55
(rmgpy.data.kinetics.KineticsFamily method), has_lone_pairs() (rmgpy.molecule.Molecule
34 method), 124
getTotalMass() (rmgpy.statmech.Conformer method), has_reactive_molecule()
254 (rmgpy.rmg.model.Species method), 210
getTrainingDepository() has_reactive_molecule() (rmgpy.species.Species
(rmgpy.data.kinetics.KineticsFamily method), method), 235
34 hasAtom() (rmgpy.molecule.Group method), 136
getTrainingSet() (rmgpy.data.kinetics.KineticsFamily hasAtom() (rmgpy.molecule.Molecule method), 124
method), 34 hasBond() (rmgpy.molecule.Group method), 136
getTransportData() (rmgpy.rmg.model.Species hasBond() (rmgpy.molecule.Molecule method), 124
method), 210 hasEdge() (rmgpy.molecule.graph.Graph method), 105
getTransportData() (rmgpy.species.Species method), hasEdge() (rmgpy.molecule.Group method), 136
235 hasEdge() (rmgpy.molecule.Molecule method), 124
getUncertainty() (rmgpy.quantity.ArrayQuantity hasRateRule() (rmgpy.data.kinetics.KineticsFamily
method), 183 method), 34
getUncertainty() (rmgpy.quantity.ScalarQuantity hasRule() (rmgpy.data.kinetics.KineticsRules method),
method), 181 42
getUncertaintyType() hasStatMech() (rmgpy.pdep.Configuration method),
(rmgpy.quantity.ArrayQuantity method), 156
183 hasStatMech() (rmgpy.rmg.model.Species method),
getUncertaintyType() 210

296 Index
RMG-Py API Reference, Release 2.4.1

hasStatMech() (rmgpy.species.Species method), 235 incrementBond (rmgpy.molecule.AtomType attribute),


hasTemplate() (rmgpy.data.kinetics.DepositoryReaction 109
method), 22 incrementLonePair (rmgpy.molecule.AtomType at-
hasTemplate() (rmgpy.data.kinetics.LibraryReaction tribute), 109
method), 47 incrementLonePairs() (rmgpy.molecule.Atom
hasTemplate() (rmgpy.data.kinetics.TemplateReaction method), 114
method), 66 incrementOrder() (rmgpy.molecule.Bond method),
hasTemplate() (rmgpy.reaction.Reaction method), 189 117
hasTemplate() (rmgpy.rmg.pdep.PDepReaction incrementRadical (rmgpy.molecule.AtomType at-
method), 205 tribute), 109
hasThermo() (rmgpy.pdep.Configuration method), 156 incrementRadical() (rmgpy.molecule.Atom method),
hasThermo() (rmgpy.rmg.model.Species method), 210 114
hasThermo() (rmgpy.species.Species method), 235 index (rmgpy.data.kinetics.DepositoryReaction at-
hasVertex() (rmgpy.molecule.graph.Graph method), tribute), 22
105 index (rmgpy.data.kinetics.LibraryReaction attribute),
hasVertex() (rmgpy.molecule.Group method), 136 47
hasVertex() (rmgpy.molecule.Molecule method), 124 index (rmgpy.data.kinetics.TemplateReaction attribute),
hasWildcards() (rmgpy.molecule.GroupAtom 66
method), 129 index (rmgpy.reaction.Reaction attribute), 189
highPlimit (rmgpy.kinetics.Chebyshev attribute), 90 index (rmgpy.rmg.model.Species attribute), 210
highPlimit (rmgpy.kinetics.Lindemann attribute), 94 index (rmgpy.rmg.pdep.PDepReaction attribute), 205
highPlimit (rmgpy.kinetics.MultiPDepArrhenius at- index (rmgpy.species.Species attribute), 235
tribute), 88 inertia (rmgpy.statmech.HinderedRotor attribute), 250
highPlimit (rmgpy.kinetics.PDepArrhenius attribute), inertia (rmgpy.statmech.KRotor attribute), 245
86 inertia (rmgpy.statmech.LinearRotor attribute), 242
highPlimit (rmgpy.kinetics.PDepKineticsData at- inertia (rmgpy.statmech.NonlinearRotor attribute),
tribute), 84 243
highPlimit (rmgpy.kinetics.ThirdBody attribute), 92 inertia (rmgpy.statmech.SphericalTopRotor attribute),
highPlimit (rmgpy.kinetics.Troe attribute), 96 246
HinderedRotor (class in rmgpy.statmech), 248 initialConcentrations
hinderedRotor_d_heatCapacity_d_barr() (in (rmgpy.solver.LiquidReactor attribute), 227
module rmgpy.data.statmechfit), 55 initialize() (arkane.PressureDependenceJob
hinderedRotor_d_heatCapacity_d_freq() (in method), 10
module rmgpy.data.statmechfit), 55 initialize() (rmgpy.data.statmechfit.DirectFit
hinderedRotor_heatCapacity() (in module method), 55
rmgpy.data.statmechfit), 55 initialize() (rmgpy.data.statmechfit.PseudoFit
method), 58
I initialize() (rmgpy.data.statmechfit.PseudoRotorFit
id (rmgpy.molecule.Atom attribute), 114 method), 57
IdealGasTranslation (class in rmgpy.statmech), 239 initialize() (rmgpy.pdep.Network method), 159
identifyRingMembership() initialize() (rmgpy.qm.gaussian.GaussianMol
(rmgpy.molecule.Molecule method), 124 method), 168
ignore (rmgpy.molecule.Atom attribute), 114 initialize() (rmgpy.qm.gaussian.GaussianMolPM3
ignore (rmgpy.molecule.graph.Vertex attribute), 102 method), 170
ignore (rmgpy.molecule.GroupAtom attribute), 129 initialize() (rmgpy.qm.gaussian.GaussianMolPM6
ILPSolutionError, 266 method), 171
ImplicitBenzeneError, 266 initialize() (rmgpy.qm.main.QMCalculator
implicitHydrogens (rmgpy.molecule.Molecule method), 163
attribute), 124 initialize() (rmgpy.qm.molecule.QMMolecule
InChI (rmgpy.molecule.Molecule attribute), 118 method), 165
InChI (rmgpy.rmg.model.Species attribute), 208 initialize() (rmgpy.qm.mopac.MopacMol method),
InChI (rmgpy.species.Species attribute), 233 173
InchiException, 266 initialize() (rmgpy.qm.mopac.MopacMolPM3
method), 175

Index 297
RMG-Py API Reference, Release 2.4.1

initialize() (rmgpy.qm.mopac.MopacMolPM6 inputFileKeywords() (rmgpy.qm.mopac.MopacMol


method), 177 method), 173
initialize() (rmgpy.qm.mopac.MopacMolPM7 inputFileKeywords()
method), 178 (rmgpy.qm.mopac.MopacMolPM3 method),
initialize() (rmgpy.rmg.main.RMG method), 198 175
initialize() (rmgpy.rmg.pdep.PDepNetwork inputFileKeywords()
method), 201 (rmgpy.qm.mopac.MopacMolPM6 method),
initialize() (rmgpy.solver.LiquidReactor method), 177
227 inputFileKeywords()
initialize() (rmgpy.solver.ReactionSystem method), (rmgpy.qm.mopac.MopacMolPM7 method),
214 178
initialize() (rmgpy.solver.SimpleReactor method), inputFilePath (rmgpy.qm.gaussian.GaussianMol at-
220 tribute), 168
initialize_solver() (rmgpy.solver.LiquidReactor inputFilePath (rmgpy.qm.gaussian.GaussianMolPM3
method), 228 attribute), 170
initialize_solver() (rmgpy.solver.ReactionSystem inputFilePath (rmgpy.qm.gaussian.GaussianMolPM6
method), 214 attribute), 171
initialize_solver() (rmgpy.solver.SimpleReactor inputFilePath (rmgpy.qm.molecule.QMMolecule at-
method), 221 tribute), 165
initialize_surface() (rmgpy.solver.LiquidReactor inputFilePath (rmgpy.qm.mopac.MopacMol at-
method), 228 tribute), 173
initialize_surface() inputFilePath (rmgpy.qm.mopac.MopacMolPM3 at-
(rmgpy.solver.ReactionSystem method), 214 tribute), 175
initialize_surface() (rmgpy.solver.SimpleReactor inputFilePath (rmgpy.qm.mopac.MopacMolPM6 at-
method), 221 tribute), 177
initializeIndexSpeciesDict() inputFilePath (rmgpy.qm.mopac.MopacMolPM7 at-
(rmgpy.rmg.model.CoreEdgeReactionModel tribute), 178
method), 195 inputFilePath (rmgpy.qm.symmetry.SymmetryJob at-
initializeLog() (arkane.Arkane method), 7 tribute), 166
initializeLog() (in module rmgpy.rmg.main), 199 InvalidActionError, 267
initializeModel() (rmgpy.solver.LiquidReactor InvalidAdjacencyListError, 267
method), 228 invalidate() (rmgpy.pdep.Network method), 159
initializeModel() (rmgpy.solver.ReactionSystem invalidate() (rmgpy.rmg.pdep.PDepNetwork
method), 214 method), 201
initializeModel() (rmgpy.solver.SimpleReactor InvalidMicrocanonicalRateError, 267
method), 221 is_atom_able_to_gain_lone_pair (in module
initialMoleFractions (rmgpy.solver.SimpleReactor rmgpy.molecule.pathfinder), 146
attribute), 220 is_atom_able_to_lose_lone_pair (in module
initiate_tolerances() rmgpy.molecule.pathfinder), 146
(rmgpy.solver.LiquidReactor method), 228 is_equal() (rmgpy.molecule.Molecule method), 125
initiate_tolerances() is_forward (rmgpy.data.kinetics.DepositoryReaction
(rmgpy.solver.ReactionSystem method), 214 attribute), 23
initiate_tolerances() is_forward (rmgpy.data.kinetics.LibraryReaction at-
(rmgpy.solver.SimpleReactor method), 221 tribute), 48
InputError, 266 is_forward (rmgpy.data.kinetics.TemplateReaction at-
inputFileKeywords() tribute), 67
(rmgpy.qm.gaussian.GaussianMol method), is_forward (rmgpy.reaction.Reaction attribute), 190
168 is_forward (rmgpy.rmg.pdep.PDepReaction attribute),
inputFileKeywords() 206
(rmgpy.qm.gaussian.GaussianMolPM3 is_structure_in_list() (rmgpy.rmg.model.Species
method), 170 method), 211
inputFileKeywords() is_structure_in_list() (rmgpy.species.Species
(rmgpy.qm.gaussian.GaussianMolPM6 method), 235
method), 171 isAromatic() (rmgpy.molecule.Molecule method), 124

298 Index
RMG-Py API Reference, Release 2.4.1

isAromaticRing() (rmgpy.molecule.Group method), method), 105


136 isEdgeInCycle() (rmgpy.molecule.Group method),
isArylRadical() (rmgpy.molecule.Molecule method), 136
124 isEdgeInCycle() (rmgpy.molecule.Molecule method),
isAssociation() (rmgpy.data.kinetics.DepositoryReaction 124
method), 22 isEntryMatch() (rmgpy.data.kinetics.KineticsFamily
isAssociation() (rmgpy.data.kinetics.LibraryReaction method), 34
method), 47 isFluorine() (rmgpy.molecule.Atom method), 115
isAssociation() (rmgpy.data.kinetics.TemplateReaction isHydrogen() (rmgpy.molecule.Atom method), 115
method), 67 isHydrogenBond() (rmgpy.molecule.Bond method),
isAssociation() (rmgpy.reaction.Reaction method), 117
189 isHydrogenBond() (rmgpy.molecule.GroupBond
isAssociation() (rmgpy.rmg.pdep.PDepReaction method), 131
method), 206 isIdentical() (rmgpy.molecule.Group method), 136
isAtomInCycle() (rmgpy.molecule.Molecule method), isIdentical() (rmgpy.molecule.Molecule method),
124 124
isBalanced() (rmgpy.data.kinetics.DepositoryReaction isIdentical() (rmgpy.rmg.model.Species method),
method), 22 210
isBalanced() (rmgpy.data.kinetics.LibraryReaction isIdentical() (rmgpy.species.Species method), 235
method), 48 isIdenticalTo() (rmgpy.kinetics.Arrhenius method),
isBalanced() (rmgpy.data.kinetics.TemplateReaction 82
method), 67 isIdenticalTo() (rmgpy.kinetics.Chebyshev method),
isBalanced() (rmgpy.reaction.Reaction method), 189 90
isBalanced() (rmgpy.rmg.pdep.PDepReaction isIdenticalTo() (rmgpy.kinetics.KineticsData
method), 206 method), 80
isBenzene() (rmgpy.molecule.Bond method), 117 isIdenticalTo() (rmgpy.kinetics.Lindemann method),
isBenzene() (rmgpy.molecule.GroupBond method), 94
131 isIdenticalTo() (rmgpy.kinetics.MultiArrhenius
isBenzeneExplicit() (rmgpy.molecule.Group method), 83
method), 136 isIdenticalTo() (rmgpy.kinetics.MultiPDepArrhenius
isBimolecular() (rmgpy.pdep.Configuration method), method), 88
156 isIdenticalTo() (rmgpy.kinetics.PDepArrhenius
isBondInCycle() (rmgpy.molecule.Molecule method), method), 86
124 isIdenticalTo() (rmgpy.kinetics.PDepKineticsData
isCarbon() (rmgpy.molecule.Atom method), 115 method), 85
isCarbon() (rmgpy.molecule.GroupAtom method), 129 isIdenticalTo() (rmgpy.kinetics.ThirdBody method),
isChlorine() (rmgpy.molecule.Atom method), 115 92
isCyclic() (rmgpy.molecule.graph.Graph method), isIdenticalTo() (rmgpy.kinetics.Troe method), 97
105 isIdenticalTo() (rmgpy.thermo.NASA method), 262
isCyclic() (rmgpy.molecule.Group method), 136 isIdenticalTo() (rmgpy.thermo.NASAPolynomial
isCyclic() (rmgpy.molecule.Molecule method), 124 method), 265
isDissociation() (rmgpy.data.kinetics.DepositoryReaction
isIdenticalTo() (rmgpy.thermo.ThermoData
method), 22 method), 256
isDissociation() (rmgpy.data.kinetics.LibraryReaction isIdenticalTo() (rmgpy.thermo.Wilhoit method), 259
method), 48 isIodine() (rmgpy.molecule.Atom method), 115
isDissociation() (rmgpy.data.kinetics.TemplateReactionisIsomerization() (rmgpy.data.kinetics.DepositoryReaction
method), 67 method), 22
isDissociation() (rmgpy.reaction.Reaction method), isIsomerization() (rmgpy.data.kinetics.LibraryReaction
190 method), 48
isDissociation() (rmgpy.rmg.pdep.PDepReaction isIsomerization() (rmgpy.data.kinetics.TemplateReaction
method), 206 method), 67
isDouble() (rmgpy.molecule.Bond method), 117 isIsomerization() (rmgpy.reaction.Reaction
isDouble() (rmgpy.molecule.GroupBond method), 131 method), 190
isEdgeInCycle() (rmgpy.molecule.graph.Graph isIsomerization() (rmgpy.rmg.pdep.PDepReaction

Index 299
RMG-Py API Reference, Release 2.4.1

method), 206 isPressureDependent()


isIsomorphic() (rmgpy.data.kinetics.DepositoryReaction (rmgpy.kinetics.PDepArrhenius method),
method), 22 86
isIsomorphic() (rmgpy.data.kinetics.LibraryReaction isPressureDependent()
method), 48 (rmgpy.kinetics.PDepKineticsData method), 85
isIsomorphic() (rmgpy.data.kinetics.TemplateReaction isPressureDependent() (rmgpy.kinetics.ThirdBody
method), 67 method), 92
isIsomorphic() (rmgpy.molecule.graph.Graph isPressureDependent() (rmgpy.kinetics.Troe
method), 105 method), 97
isIsomorphic() (rmgpy.molecule.Group method), 136 isPressureValid() (rmgpy.kinetics.Chebyshev
isIsomorphic() (rmgpy.molecule.Molecule method), method), 90
124 isPressureValid() (rmgpy.kinetics.Lindemann
isIsomorphic() (rmgpy.molecule.vf2.VF2 method), method), 94
106 isPressureValid() (rmgpy.kinetics.MultiPDepArrhenius
isIsomorphic() (rmgpy.reaction.Reaction method), method), 88
190 isPressureValid() (rmgpy.kinetics.PDepArrhenius
isIsomorphic() (rmgpy.rmg.model.Species method), method), 87
210 isPressureValid() (rmgpy.kinetics.PDepKineticsData
isIsomorphic() (rmgpy.rmg.pdep.PDepReaction method), 85
method), 206 isPressureValid() (rmgpy.kinetics.ThirdBody
isIsomorphic() (rmgpy.species.Species method), 235 method), 92
isLinear() (rmgpy.molecule.Molecule method), 125 isPressureValid() (rmgpy.kinetics.Troe method), 97
isMappingValid() (rmgpy.molecule.graph.Graph isQuadruple() (rmgpy.molecule.Bond method), 117
method), 105 isQuadruple() (rmgpy.molecule.GroupBond method),
isMappingValid() (rmgpy.molecule.Group method), 131
136 isRadical() (rmgpy.molecule.Molecule method), 125
isMappingValid() (rmgpy.molecule.Molecule isSilicon() (rmgpy.molecule.Atom method), 115
method), 125 isSimilarTo() (rmgpy.kinetics.Arrhenius method), 82
isMoleculeForbidden() isSimilarTo() (rmgpy.kinetics.Chebyshev method), 90
(rmgpy.data.kinetics.KineticsFamily method), isSimilarTo() (rmgpy.kinetics.KineticsData method),
34 80
isNitrogen() (rmgpy.molecule.Atom method), 115 isSimilarTo() (rmgpy.kinetics.Lindemann method),
isNitrogen() (rmgpy.molecule.GroupAtom method), 94
129 isSimilarTo() (rmgpy.kinetics.MultiArrhenius
isNonHydrogen() (rmgpy.molecule.Atom method), 115 method), 83
isNOS() (rmgpy.molecule.Atom method), 115 isSimilarTo() (rmgpy.kinetics.MultiPDepArrhenius
isOrder() (rmgpy.molecule.Bond method), 117 method), 88
isotope (rmgpy.molecule.Element attribute), 107 isSimilarTo() (rmgpy.kinetics.PDepArrhenius
isOxygen() (rmgpy.molecule.Atom method), 115 method), 87
isOxygen() (rmgpy.molecule.GroupAtom method), 129 isSimilarTo() (rmgpy.kinetics.PDepKineticsData
isPressureDependent() (rmgpy.kinetics.Arrhenius method), 85
method), 82 isSimilarTo() (rmgpy.kinetics.ThirdBody method), 92
isPressureDependent() (rmgpy.kinetics.Chebyshev isSimilarTo() (rmgpy.kinetics.Troe method), 97
method), 90 isSimilarTo() (rmgpy.thermo.NASA method), 262
isPressureDependent() isSimilarTo() (rmgpy.thermo.NASAPolynomial
(rmgpy.kinetics.KineticsData method), 80 method), 265
isPressureDependent() (rmgpy.kinetics.Lindemann isSimilarTo() (rmgpy.thermo.ThermoData method),
method), 94 256
isPressureDependent() isSimilarTo() (rmgpy.thermo.Wilhoit method), 259
(rmgpy.kinetics.MultiArrhenius method), isSingle() (rmgpy.molecule.Bond method), 117
83 isSingle() (rmgpy.molecule.GroupBond method), 131
isPressureDependent() isSolvent (rmgpy.rmg.model.Species attribute), 211
(rmgpy.kinetics.MultiPDepArrhenius method), isSolvent (rmgpy.species.Species attribute), 235
88 isSpecificCaseOf() (rmgpy.molecule.Atom method),

300 Index
RMG-Py API Reference, Release 2.4.1

115 isTemperatureValid() (rmgpy.kinetics.Lindemann


isSpecificCaseOf() (rmgpy.molecule.AtomType method), 94
method), 109 isTemperatureValid()
isSpecificCaseOf() (rmgpy.molecule.Bond method), (rmgpy.kinetics.MultiArrhenius method),
117 83
isSpecificCaseOf() (rmgpy.molecule.graph.Edge isTemperatureValid()
method), 102 (rmgpy.kinetics.MultiPDepArrhenius method),
isSpecificCaseOf() (rmgpy.molecule.graph.Vertex 88
method), 102 isTemperatureValid()
isSpecificCaseOf() (rmgpy.molecule.GroupAtom (rmgpy.kinetics.PDepArrhenius method),
method), 129 87
isSpecificCaseOf() (rmgpy.molecule.GroupBond isTemperatureValid()
method), 132 (rmgpy.kinetics.PDepKineticsData method), 85
isSubgraphIsomorphic() isTemperatureValid() (rmgpy.kinetics.ThirdBody
(rmgpy.molecule.graph.Graph method), method), 92
105 isTemperatureValid() (rmgpy.kinetics.Troe method),
isSubgraphIsomorphic() (rmgpy.molecule.Group 97
method), 137 isTemperatureValid() (rmgpy.thermo.NASA
isSubgraphIsomorphic() (rmgpy.molecule.Molecule method), 262
method), 125 isTemperatureValid()
isSubgraphIsomorphic() (rmgpy.molecule.vf2.VF2 (rmgpy.thermo.NASAPolynomial method),
method), 106 265
isSulfur() (rmgpy.molecule.Atom method), 115 isTemperatureValid() (rmgpy.thermo.ThermoData
isSulfur() (rmgpy.molecule.GroupAtom method), 130 method), 256
isSurfaceReaction() isTemperatureValid() (rmgpy.thermo.Wilhoit
(rmgpy.data.kinetics.DepositoryReaction method), 259
method), 23 isTransitionState() (rmgpy.pdep.Configuration
isSurfaceReaction() method), 156
(rmgpy.data.kinetics.LibraryReaction method), isTriple() (rmgpy.molecule.Bond method), 117
48 isTriple() (rmgpy.molecule.GroupBond method), 132
isSurfaceReaction() isUncertaintyAdditive()
(rmgpy.data.kinetics.TemplateReaction (rmgpy.quantity.ArrayQuantity method),
method), 67 183
isSurfaceReaction() (rmgpy.reaction.Reaction isUncertaintyAdditive()
method), 190 (rmgpy.quantity.ScalarQuantity method),
isSurfaceReaction() 181
(rmgpy.rmg.pdep.PDepReaction method), isUncertaintyMultiplicative()
206 (rmgpy.quantity.ArrayQuantity method),
isSurfaceSite() (rmgpy.molecule.Atom method), 115 183
isSurfaceSite() (rmgpy.molecule.Group method), isUncertaintyMultiplicative()
137 (rmgpy.quantity.ScalarQuantity method),
isSurfaceSite() (rmgpy.molecule.GroupAtom 181
method), 130 isUnimolecular() (rmgpy.data.kinetics.DepositoryReaction
isSurfaceSite() (rmgpy.molecule.Molecule method), method), 23
125 isUnimolecular() (rmgpy.data.kinetics.LibraryReaction
isSurfaceSite() (rmgpy.rmg.model.Species method), method), 48
211 isUnimolecular() (rmgpy.data.kinetics.TemplateReaction
isSurfaceSite() (rmgpy.species.Species method), 235 method), 67
isTemperatureValid() (rmgpy.kinetics.Arrhenius isUnimolecular() (rmgpy.pdep.Configuration
method), 82 method), 156
isTemperatureValid() (rmgpy.kinetics.Chebyshev isUnimolecular() (rmgpy.reaction.Reaction method),
method), 90 190
isTemperatureValid() (rmgpy.kinetics.KineticsData isUnimolecular() (rmgpy.rmg.pdep.PDepReaction
method), 80 method), 206

Index 301
RMG-Py API Reference, Release 2.4.1

isVanDerWaals() (rmgpy.molecule.Bond method), 117 kinetics (rmgpy.data.kinetics.LibraryReaction at-


isVanDerWaals() (rmgpy.molecule.GroupBond tribute), 48
method), 132 kinetics (rmgpy.data.kinetics.TemplateReaction
isVertexInCycle() (rmgpy.molecule.graph.Graph attribute), 67
method), 105 kinetics (rmgpy.reaction.Reaction attribute), 190
isVertexInCycle() (rmgpy.molecule.Group method), kinetics (rmgpy.rmg.pdep.PDepReaction attribute),
137 206
isVertexInCycle() (rmgpy.molecule.Molecule KineticsData (class in rmgpy.kinetics), 79
method), 125 KineticsDatabase (class in rmgpy.data.kinetics), 25
KineticsDepository (class in rmgpy.data.kinetics),
J 27
jacobian() (rmgpy.solver.LiquidReactor method), 228 KineticsError, 267
jacobian() (rmgpy.solver.SimpleReactor method), 221 KineticsFamily (class in rmgpy.data.kinetics), 29
jacobianMatrix (rmgpy.solver.LiquidReactor at- KineticsGroups (class in rmgpy.data.kinetics), 37
tribute), 228 KineticsJob (class in arkane), 6
jacobianMatrix (rmgpy.solver.ReactionSystem at- KineticsLibrary (class in rmgpy.data.kinetics), 39
tribute), 214 KineticsRules (class in rmgpy.data.kinetics), 42
jacobianMatrix (rmgpy.solver.SimpleReactor at- KRotor (class in rmgpy.statmech), 244
tribute), 221 kunits (rmgpy.kinetics.Chebyshev attribute), 91

K L
k_effective_cache (rmgpy.data.kinetics.DepositoryReaction
label (rmgpy.data.kinetics.DepositoryReaction at-
attribute), 23 tribute), 23
_ _
k effective cache (rmgpy.data.kinetics.LibraryReaction label (rmgpy.data.kinetics.LibraryReaction attribute),
attribute), 48 48
k_effective_cache (rmgpy.data.kinetics.TemplateReactionlabel (rmgpy.data.kinetics.TemplateReaction attribute),
attribute), 67 68
_ _
k effective cache (rmgpy.reaction.Reaction at- label (rmgpy.molecule.Atom attribute), 115
tribute), 190 label (rmgpy.molecule.AtomType attribute), 109
_ _
k effective cache (rmgpy.rmg.pdep.PDepReaction label (rmgpy.molecule.GroupAtom attribute), 130
attribute), 206 label (rmgpy.reaction.Reaction attribute), 190
kb (rmgpy.solver.LiquidReactor attribute), 228 label (rmgpy.rmg.model.Species attribute), 211
kb (rmgpy.solver.ReactionSystem attribute), 214 label (rmgpy.rmg.pdep.PDepNetwork attribute), 201
kb (rmgpy.solver.SimpleReactor attribute), 221 label (rmgpy.rmg.pdep.PDepReaction attribute), 206
kdata (rmgpy.kinetics.KineticsData attribute), 80 label (rmgpy.species.Species attribute), 236
kdata (rmgpy.kinetics.PDepKineticsData attribute), 85 label (rmgpy.species.TransitionState attribute), 237
KekulizationError, 267 label (rmgpy.thermo.NASA attribute), 262
kekulize() (in module rmgpy.molecule.kekulize), 144 label (rmgpy.thermo.NASAPolynomial attribute), 265
kekulize() (rmgpy.molecule.kekulize.AromaticRing label (rmgpy.thermo.ThermoData attribute), 256
method), 143 label (rmgpy.thermo.Wilhoit attribute), 259
kekulize() (rmgpy.molecule.Molecule method), 125 LibraryReaction (class in rmgpy.data.kinetics), 44
Keq (rmgpy.solver.LiquidReactor attribute), 225 Lindemann (class in rmgpy.kinetics), 93
Keq (rmgpy.solver.ReactionSystem attribute), 212 LinearRotor (class in rmgpy.statmech), 241
Keq (rmgpy.solver.SimpleReactor attribute), 218 LiquidReactor (class in rmgpy.solver), 225
keywords (rmgpy.qm.gaussian.GaussianMolPM3 load() (arkane.StatMechJob method), 11
attribute), 170 load() (rmgpy.data.base.Database method), 17
keywords (rmgpy.qm.gaussian.GaussianMolPM6 load() (rmgpy.data.kinetics.KineticsDatabase method),
attribute), 171 26
keywords (rmgpy.qm.mopac.MopacMol attribute), 174 load() (rmgpy.data.kinetics.KineticsFamily method), 34
kf (rmgpy.solver.LiquidReactor attribute), 228 load() (rmgpy.data.kinetics.KineticsGroups method),
kf (rmgpy.solver.ReactionSystem attribute), 214 38
kf (rmgpy.solver.SimpleReactor attribute), 221 load() (rmgpy.data.kinetics.KineticsRules method), 42
kinetics (rmgpy.data.kinetics.DepositoryReaction at- load() (rmgpy.data.statmech.StatmechDatabase
tribute), 23 method), 51

302 Index
RMG-Py API Reference, Release 2.4.1

load() (rmgpy.data.statmech.StatmechDepository method), 26


method), 53 loadLibraries() (rmgpy.data.statmech.StatmechDatabase
load() (rmgpy.data.statmech.StatmechGroups method), method), 52
59 loadLibraries() (rmgpy.data.thermo.ThermoDatabase
load() (rmgpy.data.statmech.StatmechLibrary method), method), 71
61 loadNegativeFrequency()
load() (rmgpy.data.thermo.ThermoDatabase method), (arkane.gaussian.GaussianLog method),
71 5
load() (rmgpy.data.thermo.ThermoDepository method), loadNegativeFrequency()
72 (arkane.molpro.MolproLog method), 6
load() (rmgpy.data.thermo.ThermoGroups method), 75 loadNegativeFrequency()
load() (rmgpy.data.thermo.ThermoLibrary method), 77 (arkane.qchem.QChemLog method), 5
loadChemkinFile() (in module rmgpy.chemkin), 12 loadOld() (rmgpy.data.base.Database method), 17
loadConformer() (arkane.gaussian.GaussianLog loadOld() (rmgpy.data.kinetics.KineticsDatabase
method), 4 method), 26
loadConformer() (arkane.molpro.MolproLog loadOld() (rmgpy.data.kinetics.KineticsDepository
method), 6 method), 28
loadConformer() (arkane.qchem.QChemLog method), loadOld() (rmgpy.data.kinetics.KineticsFamily
5 method), 35
loadDepository() (rmgpy.data.statmech.StatmechDatabase loadOld() (rmgpy.data.kinetics.KineticsGroups
method), 51 method), 38
loadDepository() (rmgpy.data.thermo.ThermoDatabaseloadOld() (rmgpy.data.kinetics.KineticsLibrary
method), 71 method), 40
loadEnergy() (arkane.gaussian.GaussianLog method), loadOld() (rmgpy.data.kinetics.KineticsRules method),
4 43
loadEnergy() (arkane.molpro.MolproLog method), 6 loadOld() (rmgpy.data.statmech.StatmechDatabase
loadEnergy() (arkane.qchem.QChemLog method), 5 method), 52
loadEntry() (rmgpy.data.kinetics.KineticsGroups loadOld() (rmgpy.data.statmech.StatmechDepository
method), 38 method), 53
loadFamilies() (rmgpy.data.kinetics.KineticsDatabase loadOld() (rmgpy.data.statmech.StatmechGroups
method), 26 method), 59
loadForbidden() (rmgpy.data.kinetics.KineticsFamily loadOld() (rmgpy.data.statmech.StatmechLibrary
method), 35 method), 62
loadForceConstantMatrix() loadOld() (rmgpy.data.thermo.ThermoDatabase
(arkane.gaussian.GaussianLog method), method), 71
5 loadOld() (rmgpy.data.thermo.ThermoDepository
loadForceConstantMatrix() method), 73
(arkane.molpro.MolproLog method), 6 loadOld() (rmgpy.data.thermo.ThermoGroups
loadForceConstantMatrix() method), 75
(arkane.qchem.QChemLog method), 5 loadOld() (rmgpy.data.thermo.ThermoLibrary
loadGeometry() (arkane.gaussian.GaussianLog method), 77
method), 5 loadOldDictionary() (rmgpy.data.base.Database
loadGeometry() (arkane.molpro.MolproLog method), method), 17
6 loadOldDictionary()
loadGeometry() (arkane.qchem.QChemLog method), (rmgpy.data.kinetics.KineticsDepository
5 method), 28
loadGroups() (rmgpy.data.statmech.StatmechDatabase loadOldDictionary()
method), 52 (rmgpy.data.kinetics.KineticsFamily method),
loadGroups() (rmgpy.data.thermo.ThermoDatabase 35
method), 71 loadOldDictionary()
loadInput() (rmgpy.rmg.main.RMG method), 198 (rmgpy.data.kinetics.KineticsGroups method),
loadInputFile() (arkane.Arkane method), 8 38
loadInputFile() (in module arkane.input), 6 loadOldDictionary()
loadLibraries() (rmgpy.data.kinetics.KineticsDatabase (rmgpy.data.kinetics.KineticsLibrary method),

Index 303
RMG-Py API Reference, Release 2.4.1

40 method), 38
loadOldDictionary() loadOldTree() (rmgpy.data.kinetics.KineticsLibrary
(rmgpy.data.kinetics.KineticsRules method), 43 method), 40
loadOldDictionary() loadOldTree() (rmgpy.data.kinetics.KineticsRules
(rmgpy.data.statmech.StatmechDepository method), 43
method), 53 loadOldTree() (rmgpy.data.statmech.StatmechDepository
loadOldDictionary() method), 53
(rmgpy.data.statmech.StatmechGroups loadOldTree() (rmgpy.data.statmech.StatmechGroups
method), 59 method), 60
loadOldDictionary() loadOldTree() (rmgpy.data.statmech.StatmechLibrary
(rmgpy.data.statmech.StatmechLibrary method), 62
method), 62 loadOldTree() (rmgpy.data.thermo.ThermoDepository
loadOldDictionary() method), 73
(rmgpy.data.thermo.ThermoDepository loadOldTree() (rmgpy.data.thermo.ThermoGroups
method), 73 method), 75
loadOldDictionary() loadOldTree() (rmgpy.data.thermo.ThermoLibrary
(rmgpy.data.thermo.ThermoGroups method), method), 77
75 loadRecipe() (rmgpy.data.kinetics.KineticsFamily
loadOldDictionary() method), 35
(rmgpy.data.thermo.ThermoLibrary method), loadRecommendedFamiliesList()
77 (rmgpy.data.kinetics.KineticsDatabase
loadOldLibrary() (rmgpy.data.base.Database method), 27
method), 17 loadRestartFile() (rmgpy.rmg.main.RMG method),
loadOldLibrary() (rmgpy.data.kinetics.KineticsDepository 198
method), 28 loadRMGJavaInput() (rmgpy.rmg.main.RMG
loadOldLibrary() (rmgpy.data.kinetics.KineticsFamily method), 198
method), 35 loadScanEnergies() (arkane.gaussian.GaussianLog
loadOldLibrary() (rmgpy.data.kinetics.KineticsGroups method), 5
method), 38 loadScanEnergies() (arkane.molpro.MolproLog
loadOldLibrary() (rmgpy.data.kinetics.KineticsLibrary method), 6
method), 40 loadScanEnergies() (arkane.qchem.QChemLog
loadOldLibrary() (rmgpy.data.kinetics.KineticsRules method), 5
method), 43 loadSpeciesDictionary() (in module
loadOldLibrary() (rmgpy.data.statmech.StatmechDepository rmgpy.chemkin), 12
method), 53 loadTemplate() (rmgpy.data.kinetics.KineticsFamily
loadOldLibrary() (rmgpy.data.statmech.StatmechGroups method), 35
method), 60 loadThermoData() (rmgpy.qm.gaussian.GaussianMol
loadOldLibrary() (rmgpy.data.statmech.StatmechLibrary method), 168
method), 62 loadThermoData() (rmgpy.qm.gaussian.GaussianMolPM3
loadOldLibrary() (rmgpy.data.thermo.ThermoDepository method), 170
method), 73 loadThermoData() (rmgpy.qm.gaussian.GaussianMolPM6
loadOldLibrary() (rmgpy.data.thermo.ThermoGroups method), 171
method), 75 loadThermoData() (rmgpy.qm.molecule.QMMolecule
loadOldLibrary() (rmgpy.data.thermo.ThermoLibrary method), 165
method), 77 loadThermoData() (rmgpy.qm.mopac.MopacMol
loadOldTemplate() (rmgpy.data.kinetics.KineticsFamily method), 174
method), 35 loadThermoData() (rmgpy.qm.mopac.MopacMolPM3
loadOldTree() (rmgpy.data.base.Database method), method), 175
18 loadThermoData() (rmgpy.qm.mopac.MopacMolPM6
loadOldTree() (rmgpy.data.kinetics.KineticsDepository method), 177
method), 28 loadThermoData() (rmgpy.qm.mopac.MopacMolPM7
loadOldTree() (rmgpy.data.kinetics.KineticsFamily method), 178
method), 35 loadThermoInput() (rmgpy.rmg.main.RMG method),
loadOldTree() (rmgpy.data.kinetics.KineticsGroups 198

304 Index
RMG-Py API Reference, Release 2.4.1

loadTransportFile() (in module rmgpy.chemkin), 12 make_object() (rmgpy.thermo.ThermoData method),


loadZeroPointEnergy() 256
(arkane.gaussian.GaussianLog method), make_object() (rmgpy.thermo.Wilhoit method), 260
5 makeBond() (rmgpy.molecule.GroupBond method), 132
loadZeroPointEnergy() (arkane.molpro.MolproLog makeLogicNode() (in module rmgpy.data.base), 50
method), 6 makeNewPDepReaction()
loadZeroPointEnergy() (arkane.qchem.QChemLog (rmgpy.rmg.model.CoreEdgeReactionModel
method), 6 method), 195
logConversions() (rmgpy.solver.LiquidReactor makeNewReaction() (rmgpy.rmg.model.CoreEdgeReactionModel
method), 228 method), 195
logConversions() (rmgpy.solver.ReactionSystem makeNewSpecies() (rmgpy.rmg.model.CoreEdgeReactionModel
method), 214 method), 195
logConversions() (rmgpy.solver.SimpleReactor makeProfileGraph() (in module rmgpy.rmg.main),
method), 221 199
logFooter() (arkane.Arkane method), 8 makeSampleAtom() (rmgpy.molecule.GroupAtom
logHeader() (arkane.Arkane method), 8 method), 130
logHeader() (rmgpy.rmg.main.RMG method), 198 makeSampleMolecule() (rmgpy.molecule.Group
LogicAnd (class in rmgpy.data.base), 50 method), 137
LogicNode (class in rmgpy.data.base), 50 makeSeedMech() (rmgpy.rmg.main.RMG method), 198
LogicOr (class in rmgpy.data.base), 50 makeSpeciesLabelsIndependent()
logRates() (rmgpy.solver.LiquidReactor method), 228 (rmgpy.rmg.main.RMG method), 198
logRates() (rmgpy.solver.ReactionSystem method), makeTree() (rmgpy.data.kinetics.KineticsFamily
214 method), 35
logRates() (rmgpy.solver.SimpleReactor method), 221 mapDensitiesOfStates() (rmgpy.pdep.Network
lonePairs (rmgpy.molecule.Atom attribute), 115 method), 159
lonePairs (rmgpy.molecule.AtomType attribute), 109 mapDensitiesOfStates()
lonePairs (rmgpy.molecule.GroupAtom attribute), 130 (rmgpy.rmg.pdep.PDepNetwork method),
201
M mapDensityOfStates() (rmgpy.pdep.Configuration
make_object() (rmgpy.pdep.SingleExponentialDown method), 157
method), 154 mapping (rmgpy.molecule.Atom attribute), 115
make_object() (rmgpy.quantity.ArrayQuantity mapping (rmgpy.molecule.graph.Vertex attribute), 102
method), 183 mapping (rmgpy.molecule.GroupAtom attribute), 130
make_object() (rmgpy.quantity.ScalarQuantity mapSumOfStates() (rmgpy.pdep.Configuration
method), 182 method), 157
make_object() (rmgpy.statmech.Conformer method), markChemkinDuplicates()
254 (rmgpy.rmg.model.CoreEdgeReactionModel
make_object() (rmgpy.statmech.HarmonicOscillator method), 195
method), 248 markDuplicateReactions() (in module
make_object() (rmgpy.statmech.HinderedRotor rmgpy.chemkin), 14
method), 250 markValidDuplicates()
make_object() (rmgpy.statmech.IdealGasTranslation (rmgpy.data.kinetics.KineticsLibrary method),
method), 240 40
make_object() (rmgpy.statmech.KRotor method), 245 mass (rmgpy.molecule.Element attribute), 107
make_object() (rmgpy.statmech.LinearRotor method), mass (rmgpy.statmech.Conformer attribute), 254
242 mass (rmgpy.statmech.IdealGasTranslation attribute),
_
make object() (rmgpy.statmech.NonlinearRotor 241
method), 243 matchesSpecies() (rmgpy.data.kinetics.DepositoryReaction
_
make object() (rmgpy.statmech.SphericalTopRotor method), 23
method), 246 matchesSpecies() (rmgpy.data.kinetics.LibraryReaction
_
make object() (rmgpy.thermo.NASA method), 262 method), 49
_
make object() (rmgpy.thermo.NASAPolynomial matchesSpecies() (rmgpy.data.kinetics.TemplateReaction
method), 265 method), 68
matchesSpecies() (rmgpy.reaction.Reaction method),

Index 305
RMG-Py API Reference, Release 2.4.1

190 (rmgpy.data.base.Database method), 18


matchesSpecies() (rmgpy.rmg.pdep.PDepReaction matchNodeToStructure()
method), 207 (rmgpy.data.kinetics.KineticsDepository
matchLogicOr() (rmgpy.data.base.LogicOr method), method), 28
50 matchNodeToStructure()
matchNodeToChild() (rmgpy.data.base.Database (rmgpy.data.kinetics.KineticsFamily method),
method), 18 35
matchNodeToChild() (rmgpy.data.kinetics.KineticsDepository
matchNodeToStructure()
method), 28 (rmgpy.data.kinetics.KineticsGroups method),
matchNodeToChild() (rmgpy.data.kinetics.KineticsFamily 38
method), 35 matchNodeToStructure()
matchNodeToChild() (rmgpy.data.kinetics.KineticsGroups (rmgpy.data.kinetics.KineticsLibrary method),
method), 38 41
matchNodeToChild() (rmgpy.data.kinetics.KineticsLibrary
matchNodeToStructure()
method), 40 (rmgpy.data.kinetics.KineticsRules method), 43
matchNodeToChild() (rmgpy.data.kinetics.KineticsRules matchNodeToStructure()
method), 43 (rmgpy.data.statmech.StatmechDepository
matchNodeToChild() (rmgpy.data.statmech.StatmechDepository method), 53
method), 53 matchNodeToStructure()
matchNodeToChild() (rmgpy.data.statmech.StatmechGroups (rmgpy.data.statmech.StatmechGroups
method), 60 method), 60
matchNodeToChild() (rmgpy.data.statmech.StatmechLibrary
matchNodeToStructure()
method), 62 (rmgpy.data.statmech.StatmechLibrary
matchNodeToChild() (rmgpy.data.thermo.ThermoDepository method), 62
method), 73 matchNodeToStructure()
matchNodeToChild() (rmgpy.data.thermo.ThermoGroups (rmgpy.data.thermo.ThermoDepository
method), 75 method), 73
matchNodeToChild() (rmgpy.data.thermo.ThermoLibrarymatchNodeToStructure()
method), 77 (rmgpy.data.thermo.ThermoGroups method),
matchNodeToNode() (rmgpy.data.base.Database 75
method), 18 matchNodeToStructure()
matchNodeToNode() (rmgpy.data.kinetics.KineticsDepository (rmgpy.data.thermo.ThermoLibrary method),
method), 28 77
matchNodeToNode() (rmgpy.data.kinetics.KineticsFamily matchToStructure() (rmgpy.data.base.LogicAnd
method), 35 method), 50
matchNodeToNode() (rmgpy.data.kinetics.KineticsGroupsmatchToStructure() (rmgpy.data.base.LogicOr
method), 38 method), 50
matchNodeToNode() (rmgpy.data.kinetics.KineticsLibrarymaxAttempts (rmgpy.qm.gaussian.GaussianMol at-
method), 40 tribute), 168
matchNodeToNode() (rmgpy.data.kinetics.KineticsRules maxAttempts (rmgpy.qm.gaussian.GaussianMolPM3
method), 43 attribute), 170
matchNodeToNode() (rmgpy.data.statmech.StatmechDepository
maxAttempts (rmgpy.qm.gaussian.GaussianMolPM6
method), 53 attribute), 171
matchNodeToNode() (rmgpy.data.statmech.StatmechGroups maxAttempts (rmgpy.qm.molecule.QMMolecule at-
method), 60 tribute), 165
matchNodeToNode() (rmgpy.data.statmech.StatmechLibrarymaxAttempts (rmgpy.qm.mopac.MopacMol attribute),
method), 62 174
matchNodeToNode() (rmgpy.data.thermo.ThermoDepository maxAttempts (rmgpy.qm.mopac.MopacMolPM3 at-
method), 73 tribute), 175
matchNodeToNode() (rmgpy.data.thermo.ThermoGroups maxAttempts (rmgpy.qm.mopac.MopacMolPM6 at-
method), 75 tribute), 177
matchNodeToNode() (rmgpy.data.thermo.ThermoLibrary maxAttempts (rmgpy.qm.mopac.MopacMolPM7 at-
method), 77 tribute), 178
matchNodeToStructure() maxEdgeSpeciesRateRatios

306 Index
RMG-Py API Reference, Release 2.4.1

(rmgpy.solver.LiquidReactor attribute), 228 neq (rmgpy.solver.LiquidReactor attribute), 228


maxEdgeSpeciesRateRatios neq (rmgpy.solver.ReactionSystem attribute), 215
(rmgpy.solver.ReactionSystem attribute), neq (rmgpy.solver.SimpleReactor attribute), 221
215 Network (class in rmgpy.pdep), 157
maxEdgeSpeciesRateRatios network_kinetics (rmgpy.data.kinetics.DepositoryReaction
(rmgpy.solver.SimpleReactor attribute), 221 attribute), 23
maximumGrainSize (arkane.PressureDependenceJob network_kinetics (rmgpy.data.kinetics.LibraryReaction
attribute), 10 attribute), 49
maxNetworkLeakRateRatios network_kinetics (rmgpy.data.kinetics.TemplateReaction
(rmgpy.solver.LiquidReactor attribute), 228 attribute), 68
maxNetworkLeakRateRatios network_kinetics (rmgpy.reaction.Reaction at-
(rmgpy.solver.ReactionSystem attribute), tribute), 191
215 network_kinetics (rmgpy.rmg.pdep.PDepReaction
maxNetworkLeakRateRatios attribute), 207
(rmgpy.solver.SimpleReactor attribute), 221 NetworkError, 267
merge() (rmgpy.molecule.graph.Graph method), 105 networkIndices (rmgpy.solver.LiquidReactor at-
merge() (rmgpy.molecule.Group method), 137 tribute), 229
merge() (rmgpy.molecule.Molecule method), 125 networkIndices (rmgpy.solver.ReactionSystem at-
merge() (rmgpy.rmg.model.ReactionModel method), tribute), 215
196 networkIndices (rmgpy.solver.SimpleReactor at-
merge() (rmgpy.rmg.pdep.PDepNetwork method), 201 tribute), 222
mergeGroups() (rmgpy.molecule.Group method), 137 networkLeakCoefficients
modes (rmgpy.statmech.Conformer attribute), 254 (rmgpy.solver.LiquidReactor attribute), 229
ModifiedStrongCollisionError, 267 networkLeakCoefficients
molecularWeight (rmgpy.rmg.model.Species at- (rmgpy.solver.ReactionSystem attribute),
tribute), 211 215
molecularWeight (rmgpy.species.Species attribute), networkLeakCoefficients
236 (rmgpy.solver.SimpleReactor attribute), 222
Molecule (class in rmgpy.molecule), 118 networkLeakRates (rmgpy.solver.LiquidReactor at-
molecule (rmgpy.rmg.model.Species attribute), 211 tribute), 229
molecule (rmgpy.species.Species attribute), 236 networkLeakRates (rmgpy.solver.ReactionSystem at-
MoleculeDrawer (class in rmgpy.molecule.draw), 151 tribute), 215
MolproLog (class in arkane.molpro), 6 networkLeakRates (rmgpy.solver.SimpleReactor at-
Mopac (class in rmgpy.qm.mopac), 172 tribute), 222
MopacMol (class in rmgpy.qm.mopac), 173 NonlinearRotor (class in rmgpy.statmech), 242
MopacMolPM3 (class in rmgpy.qm.mopac), 174 nSims (rmgpy.solver.LiquidReactor attribute), 228
MopacMolPM6 (class in rmgpy.qm.mopac), 176 nSims (rmgpy.solver.SimpleReactor attribute), 221
MopacMolPM7 (class in rmgpy.qm.mopac), 177 number (rmgpy.molecule.Element attribute), 107
MultiArrhenius (class in rmgpy.kinetics), 82 number (rmgpy.statmech.Conformer attribute), 254
MultiPDepArrhenius (class in rmgpy.kinetics), 87 numberOfAtoms (rmgpy.qm.qmdata.QMData attribute),
multiplicity (rmgpy.molecule.Group attribute), 137 165
multiplicity (rmgpy.molecule.Molecule attribute), numCoreReactions (rmgpy.solver.LiquidReactor at-
125 tribute), 229
multiplicity (rmgpy.rmg.model.Species attribute), numCoreReactions (rmgpy.solver.ReactionSystem at-
211 tribute), 215
multiplicity (rmgpy.species.Species attribute), 236 numCoreReactions (rmgpy.solver.SimpleReactor at-
tribute), 222
N numCoreSpecies (rmgpy.solver.LiquidReactor at-
n (rmgpy.kinetics.Arrhenius attribute), 82 tribute), 229
n (rmgpy.pdep.SingleExponentialDown attribute), 154 numCoreSpecies (rmgpy.solver.ReactionSystem at-
name (rmgpy.molecule.Element attribute), 107 tribute), 215
NASA (class in rmgpy.thermo), 260 numCoreSpecies (rmgpy.solver.SimpleReactor at-
NASAPolynomial (class in rmgpy.thermo), 263 tribute), 222
NegativeBarrierException, 267 numEdgeReactions (rmgpy.solver.LiquidReactor at-

Index 307
RMG-Py API Reference, Release 2.4.1

tribute), 229 outputFilePath (rmgpy.qm.mopac.MopacMolPM3 at-


numEdgeReactions (rmgpy.solver.ReactionSystem at- tribute), 175
tribute), 215 outputFilePath (rmgpy.qm.mopac.MopacMolPM6 at-
numEdgeReactions (rmgpy.solver.SimpleReactor at- tribute), 177
tribute), 222 outputFilePath (rmgpy.qm.mopac.MopacMolPM7 at-
numEdgeSpecies (rmgpy.solver.LiquidReactor at- tribute), 179
tribute), 229
numEdgeSpecies (rmgpy.solver.ReactionSystem at- P
tribute), 215 P (rmgpy.solver.LiquidReactor attribute), 225
numEdgeSpecies (rmgpy.solver.SimpleReactor at- P (rmgpy.solver.SimpleReactor attribute), 218
tribute), 222 pairs (rmgpy.data.kinetics.DepositoryReaction at-
numPdepNetworks (rmgpy.solver.LiquidReactor at- tribute), 23
tribute), 229 pairs (rmgpy.data.kinetics.LibraryReaction attribute),
numPdepNetworks (rmgpy.solver.ReactionSystem at- 49
tribute), 215 pairs (rmgpy.data.kinetics.TemplateReaction attribute),
numPdepNetworks (rmgpy.solver.SimpleReactor at- 68
tribute), 222 pairs (rmgpy.reaction.Reaction attribute), 191
numSurfaceReactions (rmgpy.solver.LiquidReactor pairs (rmgpy.rmg.pdep.PDepReaction attribute), 207
attribute), 229 parse() (rmgpy.qm.gaussian.Gaussian method), 167
numSurfaceReactions (rmgpy.solver.ReactionSystem parse() (rmgpy.qm.gaussian.GaussianMol method),
attribute), 215 168
numSurfaceReactions (rmgpy.solver.SimpleReactor parse() (rmgpy.qm.gaussian.GaussianMolPM3
attribute), 222 method), 170
numSurfaceSpecies (rmgpy.solver.LiquidReactor at- parse() (rmgpy.qm.gaussian.GaussianMolPM6
tribute), 229 method), 172
numSurfaceSpecies (rmgpy.solver.ReactionSystem at- parse() (rmgpy.qm.molecule.QMMolecule method),
tribute), 215 165
numSurfaceSpecies (rmgpy.solver.SimpleReactor at- parse() (rmgpy.qm.mopac.MopacMol method), 174
tribute), 222 parse() (rmgpy.qm.mopac.MopacMolPM3 method),
175
O parse() (rmgpy.qm.mopac.MopacMolPM6 method),
oDouble (rmgpy.molecule.AtomType attribute), 109 177
opticalIsomers (rmgpy.statmech.Conformer at- parse() (rmgpy.qm.mopac.MopacMolPM7 method),
tribute), 254 179
order (rmgpy.molecule.Bond attribute), 117 parse() (rmgpy.qm.symmetry.SymmetryJob method),
order (rmgpy.molecule.GroupBond attribute), 132 166
ordered_vertices (rmgpy.molecule.graph.Graph at- parseCommandLineArguments() (arkane.Arkane
tribute), 105 method), 8
ordered_vertices (rmgpy.molecule.Group attribute), parseOldLibrary() (rmgpy.data.base.Database
137 method), 18
ordered_vertices (rmgpy.molecule.Molecule at- parseOldLibrary() (rmgpy.data.kinetics.KineticsDepository
tribute), 125 method), 29
OutputError, 267 parseOldLibrary() (rmgpy.data.kinetics.KineticsFamily
outputFilePath (rmgpy.qm.gaussian.GaussianMol at- method), 36
tribute), 168 parseOldLibrary() (rmgpy.data.kinetics.KineticsGroups
outputFilePath (rmgpy.qm.gaussian.GaussianMolPM3 method), 39
attribute), 170 parseOldLibrary() (rmgpy.data.kinetics.KineticsLibrary
outputFilePath (rmgpy.qm.gaussian.GaussianMolPM6 method), 41
attribute), 172 parseOldLibrary() (rmgpy.data.kinetics.KineticsRules
outputFilePath (rmgpy.qm.molecule.QMMolecule at- method), 43
tribute), 165 parseOldLibrary() (rmgpy.data.statmech.StatmechDepository
outputFilePath (rmgpy.qm.mopac.MopacMol at- method), 54
tribute), 174 parseOldLibrary() (rmgpy.data.statmech.StatmechGroups
method), 60

308 Index
RMG-Py API Reference, Release 2.4.1

parseOldLibrary() (rmgpy.data.statmech.StatmechLibrary
poly1 (rmgpy.thermo.NASA attribute), 262
method), 62 poly2 (rmgpy.thermo.NASA attribute), 262
parseOldLibrary() (rmgpy.data.thermo.ThermoDepository
poly3 (rmgpy.thermo.NASA attribute), 262
method), 73 polynomials (rmgpy.thermo.NASA attribute), 262
parseOldLibrary() (rmgpy.data.thermo.ThermoGroups populate_resonance_algorithms (in module
method), 76 rmgpy.molecule.resonance), 142
parseOldLibrary() (rmgpy.data.thermo.ThermoLibrary Prange (rmgpy.solver.SimpleReactor attribute), 218
method), 78 PressureDependenceError, 267
Pdata (rmgpy.kinetics.PDepKineticsData attribute), 84 PressureDependenceJob (class in arkane), 9
PDepArrhenius (class in rmgpy.kinetics), 85 pressures (rmgpy.kinetics.PDepArrhenius attribute),
pdepColliderKinetics (rmgpy.solver.SimpleReactor 87
attribute), 222 prettify() (in module arkane.output), 8
pdepColliderReactionIndices PrettifyVisitor (class in arkane.output), 8
(rmgpy.solver.SimpleReactor attribute), 222 printEnlargeSummary()
PDepKineticsData (class in rmgpy.kinetics), 83 (rmgpy.rmg.model.CoreEdgeReactionModel
PDepNetwork (class in rmgpy.rmg.pdep), 200 method), 195
PDepReaction (class in rmgpy.rmg.pdep), 202 printSummary() (rmgpy.pdep.Network method), 159
pdepSpecificColliderKinetics printSummary() (rmgpy.rmg.pdep.PDepNetwork
(rmgpy.solver.SimpleReactor attribute), 222 method), 201
pdepSpecificColliderReactionIndices prioritizeThermo() (rmgpy.data.thermo.ThermoDatabase
(rmgpy.solver.SimpleReactor attribute), 223 method), 71
pickWildcards() (rmgpy.molecule.Group method), process_bonds() (rmgpy.molecule.kekulize.AromaticRing
137 method), 143
Plist (arkane.PressureDependenceJob attribute), 9 processNewReactions()
plot() (arkane.KineticsJob method), 7 (rmgpy.rmg.model.CoreEdgeReactionModel
plot() (arkane.PressureDependenceJob method), 10 method), 195
plot() (arkane.ThermoJob method), 11 processOldLibraryEntry()
plotHinderedRotor() (arkane.StatMechJob method), (rmgpy.data.kinetics.KineticsRules method), 43
11 processOldLibraryEntry()
Pmax (arkane.PressureDependenceJob attribute), 9 (rmgpy.data.statmech.StatmechGroups
Pmax (rmgpy.kinetics.Arrhenius attribute), 81 method), 60
Pmax (rmgpy.kinetics.Chebyshev attribute), 89 processOldLibraryEntry()
Pmax (rmgpy.kinetics.KineticsData attribute), 79 (rmgpy.data.statmech.StatmechLibrary
Pmax (rmgpy.kinetics.Lindemann attribute), 93 method), 62
Pmax (rmgpy.kinetics.MultiArrhenius attribute), 82 processOldLibraryEntry()
Pmax (rmgpy.kinetics.MultiPDepArrhenius attribute), 87 (rmgpy.data.thermo.ThermoGroups method),
Pmax (rmgpy.kinetics.PDepArrhenius attribute), 85 76
Pmax (rmgpy.kinetics.PDepKineticsData attribute), 84 processOldLibraryEntry()
Pmax (rmgpy.kinetics.ThirdBody attribute), 91 (rmgpy.data.thermo.ThermoLibrary method),
Pmax (rmgpy.kinetics.Troe attribute), 95 78
Pmin (arkane.PressureDependenceJob attribute), 9 processPdepNetworks() (rmgpy.rmg.main.RMG
Pmin (rmgpy.kinetics.Arrhenius attribute), 81 method), 199
Pmin (rmgpy.kinetics.Chebyshev attribute), 89 processProfileStats() (in module
Pmin (rmgpy.kinetics.KineticsData attribute), 80 rmgpy.rmg.main), 199
Pmin (rmgpy.kinetics.Lindemann attribute), 93 processReactionsToSpecies()
Pmin (rmgpy.kinetics.MultiArrhenius attribute), 82 (rmgpy.rmg.main.RMG method), 199
Pmin (rmgpy.kinetics.MultiPDepArrhenius attribute), 87 processToSpeciesNetworks()
Pmin (rmgpy.kinetics.PDepArrhenius attribute), 86 (rmgpy.rmg.main.RMG method), 199
Pmin (rmgpy.kinetics.PDepKineticsData attribute), 84 productIndices (rmgpy.solver.LiquidReactor at-
Pmin (rmgpy.kinetics.ThirdBody attribute), 91 tribute), 229
Pmin (rmgpy.kinetics.Troe attribute), 95 productIndices (rmgpy.solver.ReactionSystem at-
PointGroup (class in rmgpy.qm.symmetry), 166 tribute), 216
PointGroupCalculator (class in productIndices (rmgpy.solver.SimpleReactor at-
rmgpy.qm.symmetry), 166 tribute), 223

Index 309
RMG-Py API Reference, Release 2.4.1

products (rmgpy.data.kinetics.DepositoryReaction at- QMVerifier (class in rmgpy.qm.qmverifier), 165


tribute), 23 quadruple (rmgpy.molecule.AtomType attribute), 109
products (rmgpy.data.kinetics.LibraryReaction at- Quantity() (in module rmgpy.quantity), 184
tribute), 49 QuantityError, 267
products (rmgpy.data.kinetics.TemplateReaction quantum (rmgpy.statmech.HarmonicOscillator at-
attribute), 68 tribute), 248
products (rmgpy.reaction.Reaction attribute), 191 quantum (rmgpy.statmech.HinderedRotor attribute), 250
products (rmgpy.rmg.pdep.PDepReaction attribute), quantum (rmgpy.statmech.IdealGasTranslation at-
207 tribute), 241
props (rmgpy.molecule.Atom attribute), 115 quantum (rmgpy.statmech.KRotor attribute), 245
props (rmgpy.molecule.Group attribute), 137 quantum (rmgpy.statmech.LinearRotor attribute), 242
props (rmgpy.molecule.GroupAtom attribute), 130 quantum (rmgpy.statmech.NonlinearRotor attribute),
props (rmgpy.molecule.Molecule attribute), 125 243
props (rmgpy.rmg.model.Species attribute), 211 quantum (rmgpy.statmech.SphericalTopRotor attribute),
props (rmgpy.species.Species attribute), 236 246
prunableNetworkIndices
(rmgpy.solver.LiquidReactor attribute), 229 R
prunableNetworkIndices radicalCount (rmgpy.molecule.Group attribute), 137
(rmgpy.solver.ReactionSystem attribute), radicalElectrons (rmgpy.molecule.Atom attribute),
216 115
prunableNetworkIndices radicalElectrons (rmgpy.molecule.GroupAtom at-
(rmgpy.solver.SimpleReactor attribute), 223 tribute), 130
prunableNetworks (rmgpy.solver.LiquidReactor at- rank (rmgpy.data.kinetics.DepositoryReaction attribute),
tribute), 229 23
prunableNetworks (rmgpy.solver.ReactionSystem at- rank (rmgpy.data.kinetics.LibraryReaction attribute), 49
tribute), 216 rank (rmgpy.data.kinetics.TemplateReaction attribute),
prunableNetworks (rmgpy.solver.SimpleReactor at- 68
tribute), 223 rank (rmgpy.reaction.Reaction attribute), 191
prunableSpecies (rmgpy.solver.LiquidReactor at- rank (rmgpy.rmg.pdep.PDepReaction attribute), 207
tribute), 230 rd_build() (rmgpy.qm.molecule.Geometry method),
prunableSpecies (rmgpy.solver.ReactionSystem at- 163
tribute), 216 rd_embed() (rmgpy.qm.molecule.Geometry method),
prunableSpecies (rmgpy.solver.SimpleReactor at- 164
tribute), 223 rdMol (rmgpy.molecule.Molecule attribute), 126
prunableSpeciesIndices rdMolConfId (rmgpy.molecule.Molecule attribute), 126
(rmgpy.solver.LiquidReactor attribute), 230 rDouble (rmgpy.molecule.AtomType attribute), 110
prunableSpeciesIndices react_molecules() (rmgpy.data.kinetics.KineticsDatabase
(rmgpy.solver.ReactionSystem attribute), method), 27
216 reactantIndices (rmgpy.solver.LiquidReactor at-
prunableSpeciesIndices tribute), 230
(rmgpy.solver.SimpleReactor attribute), 223 reactantIndices (rmgpy.solver.ReactionSystem at-
prune() (rmgpy.rmg.model.CoreEdgeReactionModel tribute), 216
method), 195 reactantIndices (rmgpy.solver.SimpleReactor at-
pruneHeteroatoms() (rmgpy.data.thermo.ThermoDatabase tribute), 223
method), 71 reactants (rmgpy.data.kinetics.DepositoryReaction at-
PseudoFit (class in rmgpy.data.statmechfit), 57 tribute), 23
PseudoRotorFit (class in rmgpy.data.statmechfit), 56 reactants (rmgpy.data.kinetics.LibraryReaction
attribute), 49
Q reactants (rmgpy.data.kinetics.TemplateReaction at-
QChemLog (class in arkane.qchem), 5 tribute), 68
QMCalculator (class in rmgpy.qm.main), 162 reactants (rmgpy.reaction.Reaction attribute), 191
QMData (class in rmgpy.qm.qmdata), 165 reactants (rmgpy.rmg.pdep.PDepReaction attribute),
QMMolecule (class in rmgpy.qm.molecule), 164 207
QMSettings (class in rmgpy.qm.main), 162 Reaction (class in rmgpy.reaction), 185

310 Index
RMG-Py API Reference, Release 2.4.1

ReactionDrawer (class in rmgpy.molecule.draw), 151 removeBond() (rmgpy.molecule.Molecule method), 126


ReactionError, 267 removeCommentFromLine() (in module
reactionIndex (rmgpy.solver.LiquidReactor attribute), rmgpy.chemkin), 13
230 removeEdge() (rmgpy.molecule.graph.Graph method),
reactionIndex (rmgpy.solver.ReactionSystem at- 105
tribute), 216 removeEdge() (rmgpy.molecule.Group method), 137
reactionIndex (rmgpy.solver.SimpleReactor attribute), removeEdge() (rmgpy.molecule.Molecule method), 126
223 removeEmptyPdepNetworks()
ReactionModel (class in rmgpy.rmg.model), 196 (rmgpy.rmg.model.CoreEdgeReactionModel
ReactionPairsError, 267 method), 196
ReactionRecipe (class in rmgpy.data.kinetics), 50 removeGroup() (rmgpy.data.base.Database method),
ReactionSystem (class in rmgpy.solver), 212 18
reactive (rmgpy.molecule.Molecule attribute), 126 removeGroup() (rmgpy.data.kinetics.KineticsDepository
reactive (rmgpy.rmg.model.Species attribute), 211 method), 29
reactive (rmgpy.species.Species attribute), 236 removeGroup() (rmgpy.data.kinetics.KineticsFamily
readInputFile() (in module rmgpy.rmg.input), 197 method), 36
readKineticsEntry() (in module rmgpy.chemkin), 12 removeGroup() (rmgpy.data.kinetics.KineticsGroups
readMeaningfulLineJava() (rmgpy.rmg.main.RMG method), 39
method), 199 removeGroup() (rmgpy.data.kinetics.KineticsLibrary
readReactionComments() (in module method), 41
rmgpy.chemkin), 12 removeGroup() (rmgpy.data.kinetics.KineticsRules
readReactionsBlock() (in module rmgpy.chemkin), method), 43
13 removeGroup() (rmgpy.data.statmech.StatmechDepository
readThermoEntry() (in module rmgpy.chemkin), 13 method), 54
reconstructKineticsFromSource() removeGroup() (rmgpy.data.statmech.StatmechGroups
(rmgpy.data.kinetics.KineticsDatabase method), 60
method), 27 removeGroup() (rmgpy.data.statmech.StatmechLibrary
recordPolycylicGenericNodes() method), 63
(rmgpy.data.thermo.ThermoDatabase method), removeGroup() (rmgpy.data.thermo.ThermoDepository
71 method), 73
recordRingGenericNodes() removeGroup() (rmgpy.data.thermo.ThermoGroups
(rmgpy.data.thermo.ThermoDatabase method), method), 76
71 removeGroup() (rmgpy.data.thermo.ThermoLibrary
reg_dim (rmgpy.molecule.GroupBond attribute), 132 method), 78
reg_dim_atm (rmgpy.molecule.GroupAtom attribute), removeSpeciesFromEdge()
130 (rmgpy.rmg.model.CoreEdgeReactionModel
reg_dim_r (rmgpy.molecule.GroupAtom attribute), 130 method), 196
reg_dim_u (rmgpy.molecule.GroupAtom attribute), 130 removeVanDerWaalsBonds() (rmgpy.molecule.Group
register_listeners() (rmgpy.rmg.main.RMG method), 138
method), 199 removeVanDerWaalsBonds()
registerReaction() (rmgpy.rmg.model.CoreEdgeReactionModel (rmgpy.molecule.Molecule method), 126
method), 195 removeVertex() (rmgpy.molecule.graph.Graph
regularize() (rmgpy.data.kinetics.KineticsFamily method), 105
method), 36 removeVertex() (rmgpy.molecule.Group method), 138
remove_disconnected_reactions() removeVertex() (rmgpy.molecule.Molecule method),
(rmgpy.rmg.pdep.PDepNetwork method), 126
201 render() (rmgpy.molecule.draw.MoleculeDrawer
remove_H_bonds() (rmgpy.molecule.Molecule method), 151
method), 126 ReservoirStateError, 267
remove_reactions() (rmgpy.rmg.pdep.PDepNetwork reset_max_edge_species_rate_ratios()
method), 201 (rmgpy.solver.LiquidReactor method), 230
removeAtom() (rmgpy.molecule.Group method), 137 reset_max_edge_species_rate_ratios()
removeAtom() (rmgpy.molecule.Molecule method), 126 (rmgpy.solver.ReactionSystem method), 216
removeBond() (rmgpy.molecule.Group method), 137 reset_max_edge_species_rate_ratios()

Index 311
RMG-Py API Reference, Release 2.4.1

(rmgpy.solver.SimpleReactor method), 223 tribute), 49


resetConnectivityValues() (rmgpy.molecule.Atom reversible (rmgpy.data.kinetics.TemplateReaction at-
method), 116 tribute), 68
resetConnectivityValues() reversible (rmgpy.reaction.Reaction attribute), 191
(rmgpy.molecule.graph.Graph method), reversible (rmgpy.rmg.pdep.PDepReaction attribute),
105 207
resetConnectivityValues() ring_bonds (rmgpy.molecule.kekulize.AromaticBond
(rmgpy.molecule.graph.Vertex method), 102 attribute), 143
resetConnectivityValues() RMG (class in rmgpy.rmg.main), 197
(rmgpy.molecule.Group method), 138 rmgpy.chemkin (module), 11
resetConnectivityValues() rmgpy.constants (module), 14
(rmgpy.molecule.GroupAtom method), 130 rmgpy.data (module), 15
resetConnectivityValues() rmgpy.exceptions (module), 266
(rmgpy.molecule.Molecule method), 126 rmgpy.kinetics (module), 79
resetRingMembership() (rmgpy.molecule.Group rmgpy.molecule (module), 99
method), 138 rmgpy.molecule.adjlist (module), 148
residual() (rmgpy.solver.LiquidReactor method), 230 rmgpy.molecule.converter (module), 146
residual() (rmgpy.solver.ReactionSystem method), rmgpy.molecule.kekulize (module), 142
216 rmgpy.molecule.pathfinder (module), 144
residual() (rmgpy.solver.SimpleReactor method), 223 rmgpy.molecule.resonance (module), 139
resolved (rmgpy.molecule.kekulize.AromaticRing at- rmgpy.molecule.translator (module), 147
tribute), 143 rmgpy.pdep (module), 152
ResonanceError, 267 rmgpy.qm (module), 161
restore_vertex_order() rmgpy.quantity (module), 179
(rmgpy.molecule.graph.Graph method), rmgpy.reaction (module), 185
105 rmgpy.rmg (module), 192
restore_vertex_order() (rmgpy.molecule.Group rmgpy.solver (module), 212
method), 138 rmgpy.species (module), 232
restore_vertex_order() (rmgpy.molecule.Molecule rmgpy.statmech (module), 238
method), 126 rmgpy.statmech.schrodinger (module), 251
retrieve() (rmgpy.rmg.model.CoreEdgeReactionModel rmgpy.thermo (module), 255
method), 196 rotationalConstant (rmgpy.statmech.HinderedRotor
retrieveOriginalEntry() attribute), 251
(rmgpy.data.kinetics.KineticsFamily method), rotationalConstant (rmgpy.statmech.KRotor at-
36 tribute), 245
retrieveTemplate() (rmgpy.data.kinetics.KineticsFamilyrotationalConstant (rmgpy.statmech.LinearRotor
method), 36 attribute), 242
reverseThisArrheniusRate() rotationalConstant (rmgpy.statmech.NonlinearRotor
(rmgpy.data.kinetics.DepositoryReaction attribute), 243
method), 24 rotationalConstant (rmgpy.statmech.SphericalTopRotor
reverseThisArrheniusRate() attribute), 246
(rmgpy.data.kinetics.LibraryReaction method), rtol_array (rmgpy.solver.LiquidReactor attribute), 230
49 rtol_array (rmgpy.solver.ReactionSystem attribute),
reverseThisArrheniusRate() 216
(rmgpy.data.kinetics.TemplateReaction rtol_array (rmgpy.solver.SimpleReactor attribute),
method), 68 223
reverseThisArrheniusRate() run() (rmgpy.qm.symmetry.SymmetryJob method), 166
(rmgpy.reaction.Reaction method), 191 run_model_analysis() (rmgpy.rmg.main.RMG
reverseThisArrheniusRate() method), 199
(rmgpy.rmg.pdep.PDepReaction method), run_uncertainty_analysis()
207 (rmgpy.rmg.main.RMG method), 199
reversible (rmgpy.data.kinetics.DepositoryReaction runJobs() (rmgpy.qm.main.QMCalculator method),
attribute), 24 163
reversible (rmgpy.data.kinetics.LibraryReaction at-

312 Index
RMG-Py API Reference, Release 2.4.1

S saveDictionary() (rmgpy.data.kinetics.KineticsLibrary
S0 (rmgpy.thermo.Wilhoit attribute), 258 method), 41
S298 (rmgpy.thermo.ThermoData attribute), 255 saveDictionary() (rmgpy.data.kinetics.KineticsRules
saturate_radicals() (rmgpy.molecule.Molecule method), 44
method), 126 saveDictionary() (rmgpy.data.statmech.StatmechDepository
saturate_unfilled_valence() method), 54
(rmgpy.molecule.Molecule method), 126 saveDictionary() (rmgpy.data.statmech.StatmechGroups
save() (arkane.KineticsJob method), 7 method), 60
save() (arkane.PressureDependenceJob method), 10 saveDictionary() (rmgpy.data.statmech.StatmechLibrary
save() (arkane.StatMechJob method), 11 method), 63
save() (arkane.ThermoJob method), 11 saveDictionary() (rmgpy.data.thermo.ThermoDepository
save() (rmgpy.data.base.Database method), 18 method), 74
save() (rmgpy.data.kinetics.KineticsDatabase method), saveDictionary() (rmgpy.data.thermo.ThermoGroups
27 method), 76
save() (rmgpy.data.kinetics.KineticsDepository saveDictionary() (rmgpy.data.thermo.ThermoLibrary
method), 29 method), 78
save() (rmgpy.data.kinetics.KineticsFamily method), 36 saveDiffHTML() (in module rmgpy.rmg.output), 200
save() (rmgpy.data.kinetics.KineticsGroups method), saveEntry() (rmgpy.data.kinetics.KineticsDepository
39 method), 29
save() (rmgpy.data.kinetics.KineticsLibrary method), saveEntry() (rmgpy.data.kinetics.KineticsFamily
41 method), 36
save() (rmgpy.data.kinetics.KineticsRules method), 44 saveEntry() (rmgpy.data.kinetics.KineticsLibrary
save() (rmgpy.data.statmech.StatmechDatabase method), 41
method), 52 saveEntry() (rmgpy.data.kinetics.KineticsRules
save() (rmgpy.data.statmech.StatmechDepository method), 44
method), 54 saveEntry() (rmgpy.data.statmech.StatmechDepository
save() (rmgpy.data.statmech.StatmechGroups method), method), 54
60 saveEntry() (rmgpy.data.statmech.StatmechGroups
save() (rmgpy.data.statmech.StatmechLibrary method), method), 61
63 saveEntry() (rmgpy.data.statmech.StatmechLibrary
save() (rmgpy.data.thermo.ThermoDatabase method), method), 63
71 saveEntry() (rmgpy.data.thermo.ThermoDepository
save() (rmgpy.data.thermo.ThermoDepository method), method), 74
74 saveEntry() (rmgpy.data.thermo.ThermoGroups
save() (rmgpy.data.thermo.ThermoGroups method), 76 method), 76
save() (rmgpy.data.thermo.ThermoLibrary method), 78 saveEntry() (rmgpy.data.thermo.ThermoLibrary
saveChemkinFile() (in module rmgpy.chemkin), 13 method), 78
saveCoordinatesFromQMData() saveEverything() (rmgpy.rmg.main.RMG method),
(rmgpy.qm.molecule.Geometry method), 199
164 saveFamilies() (rmgpy.data.kinetics.KineticsDatabase
saveDepository() (rmgpy.data.kinetics.KineticsFamily method), 27
method), 36 saveGeneratedTree()
saveDepository() (rmgpy.data.statmech.StatmechDatabase (rmgpy.data.kinetics.KineticsFamily method),
method), 52 36
saveDepository() (rmgpy.data.thermo.ThermoDatabasesaveGroups() (rmgpy.data.kinetics.KineticsFamily
method), 71 method), 36
saveDictionary() (rmgpy.data.base.Database saveGroups() (rmgpy.data.statmech.StatmechDatabase
method), 18 method), 52
saveGroups()
saveDictionary() (rmgpy.data.kinetics.KineticsDepository (rmgpy.data.thermo.ThermoDatabase
method), 29 method), 71
saveDictionary() (rmgpy.data.kinetics.KineticsFamily saveHTMLFile() (in module rmgpy.chemkin), 13
method), 36 saveInput() (rmgpy.rmg.main.RMG method), 199
saveDictionary() (rmgpy.data.kinetics.KineticsGroups saveInputFile() (arkane.PressureDependenceJob
method), 39 method), 10

Index 313
RMG-Py API Reference, Release 2.4.1

saveInputFile() (in module rmgpy.rmg.input), 197 saveOldDictionary()


saveJavaKineticsLibrary() (in module (rmgpy.data.statmech.StatmechDepository
rmgpy.chemkin), 14 method), 54
saveLibraries() (rmgpy.data.kinetics.KineticsDatabase saveOldDictionary()
method), 27 (rmgpy.data.statmech.StatmechGroups
saveLibraries() (rmgpy.data.statmech.StatmechDatabase method), 61
method), 52 saveOldDictionary()
saveLibraries() (rmgpy.data.thermo.ThermoDatabase (rmgpy.data.statmech.StatmechLibrary
method), 72 method), 63
saveOld() (rmgpy.data.base.Database method), 18 saveOldDictionary()
saveOld() (rmgpy.data.kinetics.KineticsDatabase (rmgpy.data.thermo.ThermoDepository
method), 27 method), 74
saveOld() (rmgpy.data.kinetics.KineticsDepository saveOldDictionary()
method), 29 (rmgpy.data.thermo.ThermoGroups method),
saveOld() (rmgpy.data.kinetics.KineticsFamily 76
method), 36 saveOldDictionary()
saveOld() (rmgpy.data.kinetics.KineticsGroups (rmgpy.data.thermo.ThermoLibrary method),
method), 39 78
saveOld() (rmgpy.data.kinetics.KineticsLibrary saveOldLibrary() (rmgpy.data.base.Database
method), 41 method), 18
saveOld() (rmgpy.data.kinetics.KineticsRules method), saveOldLibrary() (rmgpy.data.kinetics.KineticsDepository
44 method), 29
saveOld() (rmgpy.data.statmech.StatmechDatabase saveOldLibrary() (rmgpy.data.kinetics.KineticsFamily
method), 52 method), 36
saveOld() (rmgpy.data.statmech.StatmechDepository saveOldLibrary() (rmgpy.data.kinetics.KineticsGroups
method), 54 method), 39
saveOld() (rmgpy.data.statmech.StatmechGroups saveOldLibrary() (rmgpy.data.kinetics.KineticsLibrary
method), 61 method), 41
saveOld() (rmgpy.data.statmech.StatmechLibrary saveOldLibrary() (rmgpy.data.kinetics.KineticsRules
method), 63 method), 44
saveOld() (rmgpy.data.thermo.ThermoDatabase saveOldLibrary() (rmgpy.data.statmech.StatmechDepository
method), 72 method), 54
saveOld() (rmgpy.data.thermo.ThermoDepository saveOldLibrary() (rmgpy.data.statmech.StatmechGroups
method), 74 method), 61
saveOld() (rmgpy.data.thermo.ThermoGroups saveOldLibrary() (rmgpy.data.statmech.StatmechLibrary
method), 76 method), 63
saveOld() (rmgpy.data.thermo.ThermoLibrary saveOldLibrary() (rmgpy.data.thermo.ThermoDepository
method), 78 method), 74
saveOldDictionary() (rmgpy.data.base.Database saveOldLibrary() (rmgpy.data.thermo.ThermoGroups
method), 18 method), 76
saveOldDictionary() saveOldLibrary() (rmgpy.data.thermo.ThermoLibrary
(rmgpy.data.kinetics.KineticsDepository method), 78
method), 29 saveOldTemplate() (rmgpy.data.kinetics.KineticsFamily
saveOldDictionary() method), 36
(rmgpy.data.kinetics.KineticsFamily method), saveOldTree() (rmgpy.data.base.Database method),
36 19
saveOldDictionary() saveOldTree() (rmgpy.data.kinetics.KineticsDepository
(rmgpy.data.kinetics.KineticsGroups method), method), 29
39 saveOldTree() (rmgpy.data.kinetics.KineticsFamily
saveOldDictionary() method), 37
(rmgpy.data.kinetics.KineticsLibrary method), saveOldTree() (rmgpy.data.kinetics.KineticsGroups
41 method), 39
saveOldDictionary() saveOldTree() (rmgpy.data.kinetics.KineticsLibrary
(rmgpy.data.kinetics.KineticsRules method), 44 method), 41

314 Index
RMG-Py API Reference, Release 2.4.1

saveOldTree() (rmgpy.data.kinetics.KineticsRules tribute), 177


method), 44 scriptAttempts (rmgpy.qm.mopac.MopacMolPM7 at-
saveOldTree() (rmgpy.data.statmech.StatmechDepository tribute), 179
method), 54 sDouble (rmgpy.molecule.AtomType attribute), 110
saveOldTree() (rmgpy.data.statmech.StatmechGroups searchRetrieveReactions()
method), 61 (rmgpy.rmg.model.CoreEdgeReactionModel
saveOldTree() (rmgpy.data.statmech.StatmechLibrary method), 196
method), 63 selectEnergyGrains() (rmgpy.pdep.Network
saveOldTree() (rmgpy.data.thermo.ThermoDepository method), 159
method), 74 selectEnergyGrains()
saveOldTree() (rmgpy.data.thermo.ThermoGroups (rmgpy.rmg.pdep.PDepNetwork method),
method), 76 201
saveOldTree() (rmgpy.data.thermo.ThermoLibrary selectPolynomial() (rmgpy.thermo.NASA method),
method), 78 262
saveOutputHTML() (in module rmgpy.rmg.output), 199 semiclassical (rmgpy.statmech.HinderedRotor
saveRecommendedFamilies() attribute), 251
(rmgpy.data.kinetics.KineticsDatabase sensConditions (rmgpy.solver.LiquidReactor at-
method), 27 tribute), 230
saveSpeciesDictionary() (in module sensConditions (rmgpy.solver.SimpleReactor at-
rmgpy.chemkin), 13 tribute), 223
saveThermoData() (rmgpy.qm.gaussian.GaussianMol sensitiveSpecies (rmgpy.solver.LiquidReactor at-
method), 168 tribute), 230
saveThermoData() (rmgpy.qm.gaussian.GaussianMolPM3 sensitiveSpecies (rmgpy.solver.ReactionSystem at-
method), 170 tribute), 216
saveThermoData() (rmgpy.qm.gaussian.GaussianMolPM6 sensitiveSpecies (rmgpy.solver.SimpleReactor at-
method), 172 tribute), 223
saveThermoData() (rmgpy.qm.molecule.QMMolecule sensitivityCoefficients
method), 165 (rmgpy.solver.LiquidReactor attribute), 230
saveThermoData() (rmgpy.qm.mopac.MopacMol sensitivityCoefficients
method), 174 (rmgpy.solver.ReactionSystem attribute),
saveThermoData() (rmgpy.qm.mopac.MopacMolPM3 216
method), 175 sensitivityCoefficients
saveThermoData() (rmgpy.qm.mopac.MopacMolPM6 (rmgpy.solver.SimpleReactor attribute), 223
method), 177 sensitivityThreshold (rmgpy.solver.LiquidReactor
saveThermoData() (rmgpy.qm.mopac.MopacMolPM7 attribute), 230
method), 179 sensitivityThreshold
saveTrainingReactions() (rmgpy.solver.ReactionSystem attribute),
(rmgpy.data.kinetics.KineticsFamily method), 216
37 sensitivityThreshold (rmgpy.solver.SimpleReactor
saveTransportFile() (in module rmgpy.chemkin), 13 attribute), 224
ScalarQuantity (class in rmgpy.quantity), 181 set_colliders() (rmgpy.solver.SimpleReactor
scriptAttempts (rmgpy.qm.gaussian.GaussianMol at- method), 224
tribute), 168 set_initial_conditions()
scriptAttempts (rmgpy.qm.gaussian.GaussianMolPM3 (rmgpy.solver.LiquidReactor method), 230
attribute), 170 set_initial_conditions()
scriptAttempts (rmgpy.qm.gaussian.GaussianMolPM6 (rmgpy.solver.ReactionSystem method), 216
attribute), 172 set_initial_conditions()
scriptAttempts (rmgpy.qm.molecule.QMMolecule at- (rmgpy.solver.SimpleReactor method), 224
tribute), 165 set_initial_derivative()
scriptAttempts (rmgpy.qm.mopac.MopacMol at- (rmgpy.solver.LiquidReactor method), 230
tribute), 174 set_initial_derivative()
scriptAttempts (rmgpy.qm.mopac.MopacMolPM3 at- (rmgpy.solver.ReactionSystem method), 217
tribute), 175 set_initial_derivative()
scriptAttempts (rmgpy.qm.mopac.MopacMolPM6 at- (rmgpy.solver.SimpleReactor method), 224

Index 315
RMG-Py API Reference, Release 2.4.1

set_initial_reaction_thresholds() setOrderNum() (rmgpy.molecule.Bond method), 117


(rmgpy.solver.LiquidReactor method), 230 setOrderNum() (rmgpy.molecule.GroupBond method),
set_initial_reaction_thresholds() 132
(rmgpy.solver.ReactionSystem method), 217 setOrderStr() (rmgpy.molecule.Bond method), 117
set_initial_reaction_thresholds() setOrderStr() (rmgpy.molecule.GroupBond method),
(rmgpy.solver.SimpleReactor method), 224 132
set_prunable_indices() setThermodynamicFilteringParameters()
(rmgpy.solver.LiquidReactor method), 230 (rmgpy.rmg.model.CoreEdgeReactionModel
set_prunable_indices() method), 196
(rmgpy.solver.ReactionSystem method), 217 SettingsError, 268
set_prunable_indices() setUncertainty() (rmgpy.quantity.ArrayQuantity
(rmgpy.solver.SimpleReactor method), 224 method), 184
set_structure() (rmgpy.rmg.model.Species method), setUncertainty() (rmgpy.quantity.ScalarQuantity
211 method), 182
set_structure() (rmgpy.species.Species method), 236 setUncertaintyType()
setActions() (rmgpy.molecule.AtomType method), (rmgpy.quantity.ArrayQuantity method),
110 184
setCanteraKinetics() (rmgpy.kinetics.Arrhenius setUncertaintyType()
method), 82 (rmgpy.quantity.ScalarQuantity method),
setCanteraKinetics() (rmgpy.kinetics.Chebyshev 182
method), 91 setValue() (rmgpy.quantity.ArrayQuantity method),
setCanteraKinetics() (rmgpy.kinetics.KineticsData 184
method), 80 setValue() (rmgpy.quantity.ScalarQuantity method),
setCanteraKinetics() (rmgpy.kinetics.Lindemann 182
method), 94 SimpleReactor (class in rmgpy.solver), 218
setCanteraKinetics() simpleRegularization()
(rmgpy.kinetics.MultiArrhenius method), (rmgpy.data.kinetics.KineticsFamily method),
83 37
setCanteraKinetics() simulate() (rmgpy.solver.LiquidReactor method), 231
(rmgpy.kinetics.MultiPDepArrhenius method), simulate() (rmgpy.solver.ReactionSystem method),
88 217
setCanteraKinetics() simulate() (rmgpy.solver.SimpleReactor method), 224
(rmgpy.kinetics.PDepArrhenius method), single (rmgpy.molecule.AtomType attribute), 110
87 SingleExponentialDown (class in rmgpy.pdep), 153
setCanteraKinetics() SMILES (rmgpy.molecule.Molecule attribute), 118
(rmgpy.kinetics.PDepKineticsData method), 85 SMILES (rmgpy.rmg.model.Species attribute), 208
setCanteraKinetics() (rmgpy.kinetics.ThirdBody SMILES (rmgpy.species.Species attribute), 233
method), 92 snapshots (rmgpy.solver.LiquidReactor attribute), 231
setCanteraKinetics() (rmgpy.kinetics.Troe method), snapshots (rmgpy.solver.ReactionSystem attribute), 217
97 snapshots (rmgpy.solver.SimpleReactor attribute), 224
setConditions() (rmgpy.pdep.Network method), 159 solve() (rmgpy.data.statmechfit.DirectFit method), 56
setConditions() (rmgpy.rmg.pdep.PDepNetwork solve() (rmgpy.data.statmechfit.PseudoFit method), 58
method), 202 solve() (rmgpy.data.statmechfit.PseudoRotorFit
setDefaultOutputDirectory() method), 57
(rmgpy.qm.main.QMCalculator method), solve_SS_network() (rmgpy.rmg.pdep.PDepNetwork
163 method), 202
setDeltaAtomicAdsorptionEnergies() solveFullME() (rmgpy.pdep.Network method), 159
(rmgpy.data.thermo.ThermoDatabase method), solveFullME() (rmgpy.rmg.pdep.PDepNetwork
72 method), 202
setE0WithThermo() (rmgpy.rmg.model.Species solveReducedME() (rmgpy.pdep.Network method), 159
method), 211 solveReducedME() (rmgpy.rmg.pdep.PDepNetwork
setE0WithThermo() (rmgpy.species.Species method), method), 202
236 solveSchrodingerEquation()
setLonePairs() (rmgpy.molecule.Atom method), 116 (rmgpy.statmech.HinderedRotor method),

316 Index
RMG-Py API Reference, Release 2.4.1

251 split() (rmgpy.molecule.Group method), 138


sortAtoms() (rmgpy.molecule.Group method), 138 split() (rmgpy.molecule.Molecule method), 127
sortAtoms() (rmgpy.molecule.Molecule method), 126 splitReactions() (rmgpy.data.kinetics.KineticsFamily
sortByConnectivity() (rmgpy.molecule.Group method), 37
method), 138 standardizeAtomType() (rmgpy.molecule.Group
sortingLabel (rmgpy.molecule.Atom attribute), 116 method), 138
sortingLabel (rmgpy.molecule.graph.Vertex attribute), standardizeGroup() (rmgpy.molecule.Group
102 method), 139
sortingLabel (rmgpy.molecule.GroupAtom attribute), StatmechDatabase (class in rmgpy.data.statmech), 51
130 StatmechDepository (class in rmgpy.data.statmech),
sortVertices() (rmgpy.molecule.graph.Graph 52
method), 105 StatmechError, 268
sortVertices() (rmgpy.molecule.Group method), 138 StatmechFitError, 268
sortVertices() (rmgpy.molecule.Molecule method), StatmechGroups (class in rmgpy.data.statmech), 59
126 StatMechJob (class in arkane), 10
Species (class in rmgpy.rmg.model), 208 StatmechLibrary (class in rmgpy.data.statmech), 61
Species (class in rmgpy.species), 232 step() (rmgpy.solver.LiquidReactor method), 231
species (rmgpy.pdep.Configuration attribute), 157 step() (rmgpy.solver.ReactionSystem method), 217
SpeciesError, 268 step() (rmgpy.solver.SimpleReactor method), 224
speciesIndex (rmgpy.solver.LiquidReactor attribute), succesfulJobExists()
231 (rmgpy.qm.qmverifier.QMVerifier method),
speciesIndex (rmgpy.solver.ReactionSystem attribute), 166
217 successKeys (rmgpy.qm.gaussian.Gaussian attribute),
speciesIndex (rmgpy.solver.SimpleReactor attribute), 167
224 successKeys (rmgpy.qm.mopac.Mopac attribute), 172
specific (rmgpy.molecule.AtomType attribute), 110 sumStates (rmgpy.pdep.Configuration attribute), 157
specificCollider (rmgpy.data.kinetics.DepositoryReactionsurfaceReactionIndices
attribute), 24 (rmgpy.solver.LiquidReactor attribute), 231
specificCollider (rmgpy.data.kinetics.LibraryReaction surfaceReactionIndices
attribute), 49 (rmgpy.solver.ReactionSystem attribute),
specificCollider (rmgpy.data.kinetics.TemplateReaction 217
attribute), 68 surfaceReactionIndices
specificCollider (rmgpy.reaction.Reaction at- (rmgpy.solver.SimpleReactor attribute), 224
tribute), 191 surfaceSpeciesIndices
specificCollider (rmgpy.rmg.pdep.PDepReaction (rmgpy.solver.LiquidReactor attribute), 231
attribute), 207 surfaceSpeciesIndices
specificColliderSpecies (rmgpy.solver.ReactionSystem attribute),
(rmgpy.solver.SimpleReactor attribute), 224 217
specifyAtomExtensions() (rmgpy.molecule.Group surfaceSpeciesIndices
method), 138 (rmgpy.solver.SimpleReactor attribute), 224
specifyBondExtensions() (rmgpy.molecule.Group symbol (rmgpy.molecule.Element attribute), 107
method), 138 symmetry (rmgpy.statmech.HinderedRotor attribute),
specifyExternalNewBondExtensions() 251
(rmgpy.molecule.Group method), 138 symmetry (rmgpy.statmech.KRotor attribute), 245
specifyInternalNewBondExtensions() symmetry (rmgpy.statmech.LinearRotor attribute), 242
(rmgpy.molecule.Group method), 138 symmetry (rmgpy.statmech.NonlinearRotor attribute),
specifyRingExtensions() (rmgpy.molecule.Group 243
method), 138 symmetry (rmgpy.statmech.SphericalTopRotor at-
specifyUnpairedExtensions() tribute), 246
(rmgpy.molecule.Group method), 138 SymmetryJob (class in rmgpy.qm.symmetry), 166
SphericalTopRotor (class in rmgpy.statmech), 245 symmetryNumber (rmgpy.molecule.Molecule attribute),
spinMultiplicity (rmgpy.statmech.Conformer 127
attribute), 254 symmetryNumber (rmgpy.rmg.model.Species attribute),
split() (rmgpy.molecule.graph.Graph method), 106 211

Index 317
RMG-Py API Reference, Release 2.4.1

symmetryNumber (rmgpy.species.Species attribute), 236 Tmax (rmgpy.kinetics.ThirdBody attribute), 91


Tmax (rmgpy.kinetics.Troe attribute), 96
T Tmax (rmgpy.thermo.NASA attribute), 261
T (rmgpy.solver.LiquidReactor attribute), 225 Tmax (rmgpy.thermo.NASAPolynomial attribute), 264
T (rmgpy.solver.SimpleReactor attribute), 218 Tmax (rmgpy.thermo.ThermoData attribute), 255
T0 (rmgpy.kinetics.Arrhenius attribute), 81 Tmax (rmgpy.thermo.Wilhoit attribute), 258
T0 (rmgpy.pdep.SingleExponentialDown attribute), 153 Tmin (arkane.KineticsJob attribute), 7
t0 (rmgpy.solver.LiquidReactor attribute), 231 Tmin (arkane.PressureDependenceJob attribute), 10
t0 (rmgpy.solver.ReactionSystem attribute), 217 Tmin (rmgpy.kinetics.Arrhenius attribute), 81
t0 (rmgpy.solver.SimpleReactor attribute), 225 Tmin (rmgpy.kinetics.Chebyshev attribute), 89
T1 (rmgpy.kinetics.Troe attribute), 95 Tmin (rmgpy.kinetics.KineticsData attribute), 80
T2 (rmgpy.kinetics.Troe attribute), 96 Tmin (rmgpy.kinetics.Lindemann attribute), 93
T3 (rmgpy.kinetics.Troe attribute), 96 Tmin (rmgpy.kinetics.MultiArrhenius attribute), 83
Tdata (rmgpy.kinetics.KineticsData attribute), 80 Tmin (rmgpy.kinetics.MultiPDepArrhenius attribute), 87
Tdata (rmgpy.kinetics.PDepKineticsData attribute), 84 Tmin (rmgpy.kinetics.PDepArrhenius attribute), 86
Tdata (rmgpy.thermo.ThermoData attribute), 255 Tmin (rmgpy.kinetics.PDepKineticsData attribute), 84
TemplateReaction (class in rmgpy.data.kinetics), 63 Tmin (rmgpy.kinetics.ThirdBody attribute), 91
terminal (rmgpy.molecule.Atom attribute), 116 Tmin (rmgpy.kinetics.Troe attribute), 96
terminal (rmgpy.molecule.graph.Vertex attribute), 102 Tmin (rmgpy.thermo.NASA attribute), 261
terminal (rmgpy.molecule.GroupAtom attribute), 130 Tmin (rmgpy.thermo.NASAPolynomial attribute), 264
termination (rmgpy.solver.LiquidReactor attribute), Tmin (rmgpy.thermo.ThermoData attribute), 255
231 Tmin (rmgpy.thermo.Wilhoit attribute), 258
termination (rmgpy.solver.ReactionSystem attribute), toAdjacencyList() (in module
217 rmgpy.molecule.adjlist), 150
termination (rmgpy.solver.SimpleReactor attribute), toAdjacencyList() (rmgpy.molecule.Group method),
225 139
TerminationConversion (class in rmgpy.solver), 232 toAdjacencyList() (rmgpy.molecule.Molecule
TerminationTime (class in rmgpy.solver), 232 method), 127
thermo (rmgpy.rmg.model.Species attribute), 211 toAdjacencyList() (rmgpy.rmg.model.Species
thermo (rmgpy.species.Species attribute), 236 method), 212
ThermoData (class in rmgpy.thermo), 255 toAdjacencyList() (rmgpy.species.Species method),
ThermoDatabase (class in rmgpy.data.thermo), 69 236
ThermoDepository (class in rmgpy.data.thermo), 72 toArrhenius() (rmgpy.kinetics.MultiArrhenius
thermoFilterDown() (rmgpy.rmg.model.CoreEdgeReactionModel method), 83
method), 196 toArrheniusEP() (rmgpy.kinetics.Arrhenius method),
thermoFilterSpecies() 82
(rmgpy.rmg.model.CoreEdgeReactionModel toAugmentedInChI() (rmgpy.molecule.Molecule
method), 196 method), 127
ThermoGroups (class in rmgpy.data.thermo), 74 toAugmentedInChIKey() (rmgpy.molecule.Molecule
ThermoJob (class in arkane), 11 method), 127
ThermoLibrary (class in rmgpy.data.thermo), 76 toCantera() (rmgpy.data.kinetics.DepositoryReaction
ThirdBody (class in rmgpy.kinetics), 91 method), 24
Tlist (arkane.KineticsJob attribute), 7 toCantera() (rmgpy.data.kinetics.LibraryReaction
Tlist (arkane.PressureDependenceJob attribute), 9 method), 49
Tmax (arkane.KineticsJob attribute), 7 toCantera() (rmgpy.data.kinetics.TemplateReaction
Tmax (arkane.PressureDependenceJob attribute), 10 method), 68
Tmax (rmgpy.kinetics.Arrhenius attribute), 81 toCantera() (rmgpy.reaction.Reaction method), 191
Tmax (rmgpy.kinetics.Chebyshev attribute), 89 toCantera() (rmgpy.rmg.model.Species method), 212
Tmax (rmgpy.kinetics.KineticsData attribute), 80 toCantera() (rmgpy.rmg.pdep.PDepReaction method),
Tmax (rmgpy.kinetics.Lindemann attribute), 93 207
Tmax (rmgpy.kinetics.MultiArrhenius attribute), 82 toCantera() (rmgpy.species.Species method), 236
Tmax (rmgpy.kinetics.MultiPDepArrhenius attribute), 87 toCantera() (rmgpy.thermo.NASA method), 262
Tmax (rmgpy.kinetics.PDepArrhenius attribute), 86 toCanteraKinetics() (rmgpy.kinetics.Arrhenius
Tmax (rmgpy.kinetics.PDepKineticsData attribute), 84 method), 82

318 Index
RMG-Py API Reference, Release 2.4.1

toChemkin() (rmgpy.data.kinetics.DepositoryReaction Trange (rmgpy.solver.SimpleReactor attribute), 218


method), 24 TransitionState (class in rmgpy.species), 237
toChemkin() (rmgpy.data.kinetics.LibraryReaction transitionState (rmgpy.data.kinetics.DepositoryReaction
method), 49 attribute), 24
toChemkin() (rmgpy.data.kinetics.TemplateReaction transitionState (rmgpy.data.kinetics.LibraryReaction
method), 68 attribute), 49
toChemkin() (rmgpy.reaction.Reaction method), 191 transitionState (rmgpy.data.kinetics.TemplateReaction
toChemkin() (rmgpy.rmg.model.Species method), 212 attribute), 69
toChemkin() (rmgpy.rmg.pdep.PDepReaction method), transitionState (rmgpy.reaction.Reaction attribute),
207 191
toChemkin() (rmgpy.species.Species method), 236 transitionState (rmgpy.rmg.pdep.PDepReaction at-
toGroup() (rmgpy.molecule.Molecule method), 127 tribute), 207
toHTML() (rmgpy.kinetics.Arrhenius method), 82 transportData (rmgpy.rmg.model.Species attribute),
toHTML() (rmgpy.kinetics.Chebyshev method), 91 212
toHTML() (rmgpy.kinetics.KineticsData method), 80 transportData (rmgpy.species.Species attribute), 236
toHTML() (rmgpy.kinetics.Lindemann method), 94 trimolecular (rmgpy.solver.LiquidReactor attribute),
toHTML() (rmgpy.kinetics.MultiArrhenius method), 83 231
toHTML() (rmgpy.kinetics.MultiPDepArrhenius trimolecular (rmgpy.solver.ReactionSystem attribute),
method), 88 217
toHTML() (rmgpy.kinetics.PDepArrhenius method), 87 trimolecular (rmgpy.solver.SimpleReactor attribute),
toHTML() (rmgpy.kinetics.PDepKineticsData method), 225
85 trimolecularThreshold
toHTML() (rmgpy.kinetics.ThirdBody method), 92 (rmgpy.solver.LiquidReactor attribute), 231
toHTML() (rmgpy.kinetics.Troe method), 97 trimolecularThreshold
toInChI (in module rmgpy.molecule.translator), 147 (rmgpy.solver.ReactionSystem attribute),
toInChI() (rmgpy.molecule.Molecule method), 127 217
toInChIKey (in module rmgpy.molecule.translator), 147 trimolecularThreshold
toInChIKey() (rmgpy.molecule.Molecule method), 127 (rmgpy.solver.SimpleReactor attribute), 225
toLabeledStr() (rmgpy.data.kinetics.DepositoryReactiontriple (rmgpy.molecule.AtomType attribute), 110
method), 24 Troe (class in rmgpy.kinetics), 95
toLabeledStr() (rmgpy.data.kinetics.LibraryReaction tunneling (rmgpy.species.TransitionState attribute),
method), 49 237
toLabeledStr() (rmgpy.data.kinetics.TemplateReaction
method), 68 U
toLabeledStr() (rmgpy.reaction.Reaction method), uncertainty (rmgpy.quantity.ArrayQuantity attribute),
191 184
toLabeledStr() (rmgpy.rmg.pdep.PDepReaction uncertainty (rmgpy.quantity.ScalarQuantity at-
method), 207 tribute), 182
toNASA() (rmgpy.thermo.ThermoData method), 256 uncertainty_si (rmgpy.quantity.ArrayQuantity
toNASA() (rmgpy.thermo.Wilhoit method), 260 attribute), 184
toOBMol (in module rmgpy.molecule.converter), 147 uncertainty_si (rmgpy.quantity.ScalarQuantity at-
toRDKitMol (in module rmgpy.molecule.converter), 147 tribute), 182
toRDKitMol() (rmgpy.molecule.Molecule method), 127 uncertaintyType (rmgpy.quantity.ArrayQuantity at-
toSingleBonds() (rmgpy.molecule.Molecule method), tribute), 184
127 uncertaintyType (rmgpy.quantity.ScalarQuantity at-
toSMARTS (in module rmgpy.molecule.translator), 148 tribute), 182
toSMARTS() (rmgpy.molecule.Molecule method), 127 UndeterminableKineticsError, 268
toSMILES (in module rmgpy.molecule.translator), 148 UnexpectedChargeError, 268
toSMILES() (rmgpy.molecule.Molecule method), 127 unimolecularThreshold
toThermoData() (rmgpy.thermo.NASA method), 262 (rmgpy.solver.LiquidReactor attribute), 231
toThermoData() (rmgpy.thermo.Wilhoit method), 260 unimolecularThreshold
toWilhoit() (rmgpy.thermo.NASA method), 262 (rmgpy.solver.ReactionSystem attribute),
toWilhoit() (rmgpy.thermo.ThermoData method), 257 218
Trange (rmgpy.solver.LiquidReactor attribute), 225

Index 319
RMG-Py API Reference, Release 2.4.1

unimolecularThreshold validLayeringIndices
(rmgpy.solver.SimpleReactor attribute), 225 (rmgpy.solver.ReactionSystem attribute),
uniqueID (rmgpy.qm.molecule.Geometry attribute), 164 218
uniqueID (rmgpy.qm.symmetry.SymmetryJob attribute), validLayeringIndices (rmgpy.solver.SimpleReactor
166 attribute), 225
uniqueIDlong (rmgpy.qm.molecule.Geometry at- value (rmgpy.quantity.ArrayQuantity attribute), 184
tribute), 164 value (rmgpy.quantity.ScalarQuantity attribute), 182
unitDegeneracy() (in module value_si (rmgpy.quantity.ArrayQuantity attribute), 184
rmgpy.statmech.schrodinger), 252 value_si (rmgpy.quantity.ScalarQuantity attribute),
units (rmgpy.quantity.ArrayQuantity attribute), 184 182
units (rmgpy.quantity.ScalarQuantity attribute), 182 verifyOutputFile() (rmgpy.qm.gaussian.Gaussian
unresolved (rmgpy.molecule.kekulize.AromaticRing at- method), 167
tribute), 143 verifyOutputFile() (rmgpy.qm.gaussian.GaussianMol
update() (rmgpy.molecule.Group method), 139 method), 168
update() (rmgpy.molecule.kekulize.AromaticBond verifyOutputFile() (rmgpy.qm.gaussian.GaussianMolPM3
method), 143 method), 170
update() (rmgpy.molecule.kekulize.AromaticRing verifyOutputFile() (rmgpy.qm.gaussian.GaussianMolPM6
method), 143 method), 172
update() (rmgpy.molecule.Molecule method), 128 verifyOutputFile() (rmgpy.qm.mopac.Mopac
update() (rmgpy.rmg.pdep.PDepNetwork method), 202 method), 172
update_charge() (rmgpy.molecule.Group method), verifyOutputFile() (rmgpy.qm.mopac.MopacMol
139 method), 174
updateAtomTypes() (rmgpy.molecule.Molecule verifyOutputFile() (rmgpy.qm.mopac.MopacMolPM3
method), 128 method), 175
updateCharge() (rmgpy.molecule.Atom method), 116 verifyOutputFile() (rmgpy.qm.mopac.MopacMolPM6
updateConfigurations() method), 177
(rmgpy.rmg.pdep.PDepNetwork method), verifyOutputFile() (rmgpy.qm.mopac.MopacMolPM7
202 method), 179
updateConnectivityValues() Vertex (class in rmgpy.molecule.graph), 101
(rmgpy.molecule.graph.Graph method), vertex1 (rmgpy.molecule.Bond attribute), 117
106 vertex1 (rmgpy.molecule.graph.Edge attribute), 102
updateConnectivityValues() vertex1 (rmgpy.molecule.GroupBond attribute), 132
(rmgpy.molecule.Group method), 139 vertex2 (rmgpy.molecule.Bond attribute), 117
updateConnectivityValues() vertex2 (rmgpy.molecule.graph.Edge attribute), 102
(rmgpy.molecule.Molecule method), 128 vertex2 (rmgpy.molecule.GroupBond attribute), 132
updateFingerprint() (rmgpy.molecule.Group vertices (rmgpy.molecule.graph.Graph attribute), 106
method), 139 vertices (rmgpy.molecule.Group attribute), 139
updateLonePairs() (rmgpy.molecule.Molecule vertices (rmgpy.molecule.Molecule attribute), 128
method), 128 VF2 (class in rmgpy.molecule.vf2), 106
updateMultiplicity() (rmgpy.molecule.Molecule VF2Error, 268
method), 128 viscosity (rmgpy.solver.LiquidReactor attribute), 232
updateReactionThresholdAndReactFlags() visit() (arkane.output.PrettifyVisitor method), 8
(rmgpy.rmg.main.RMG method), 199 visit_Call() (arkane.output.PrettifyVisitor method), 8
updateUnimolecularReactionNetworks() visit_Dict() (arkane.output.PrettifyVisitor method), 8
(rmgpy.rmg.model.CoreEdgeReactionModel visit_List() (arkane.output.PrettifyVisitor method), 8
method), 196 visit_Num() (arkane.output.PrettifyVisitor method), 8
usePolar (rmgpy.qm.mopac.Mopac attribute), 172 visit_Str() (arkane.output.PrettifyVisitor method), 8
visit_Tuple() (arkane.output.PrettifyVisitor method),
V 8
V (rmgpy.solver.LiquidReactor attribute), 226
V (rmgpy.solver.SimpleReactor attribute), 218 W
validLayeringIndices (rmgpy.solver.LiquidReactor Wigner (class in rmgpy.kinetics), 97
attribute), 231 Wilhoit (class in rmgpy.thermo), 257

320 Index
RMG-Py API Reference, Release 2.4.1

writeInputFile() (rmgpy.qm.gaussian.GaussianMol
method), 169
writeInputFile() (rmgpy.qm.gaussian.GaussianMolPM3
method), 170
writeInputFile() (rmgpy.qm.gaussian.GaussianMolPM6
method), 172
writeInputFile() (rmgpy.qm.mopac.MopacMol
method), 174
writeInputFile() (rmgpy.qm.mopac.MopacMolPM3
method), 176
writeInputFile() (rmgpy.qm.mopac.MopacMolPM6
method), 177
writeInputFile() (rmgpy.qm.mopac.MopacMolPM7
method), 179
writeInputFile() (rmgpy.qm.symmetry.SymmetryJob
method), 167
writeKineticsEntry() (in module rmgpy.chemkin),
14
writeThermoEntry() (in module rmgpy.chemkin), 14

Y
y0 (rmgpy.solver.LiquidReactor attribute), 232
y0 (rmgpy.solver.ReactionSystem attribute), 218
y0 (rmgpy.solver.SimpleReactor attribute), 225

Index 321

You might also like