Writing Chemkin files¶
Main functions¶
- rmgpy.chemkin.save_chemkin_file()¶
Save a Chemkin input file to path on disk containing the provided lists of species and reactions. If check_for_duplicates 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.save_species_dictionary()¶
Save the given list of species as adjacency lists in a text file path on disk.
If old_style==True then it saves it in the old RMG-Java syntax.
- rmgpy.chemkin.save_transport_file()¶
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:
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.
The Lennard-Jones potential well depth \(\epsilon / k_B\) in Kelvins.
The Lennard-Jones collision diameter \(\sigma\) in Angstroms.
The dipole moment \(\mu\) in Debye. Note: a Debye is \(10^{-18} cm^{3/2}erg^{1/2}\).
The polarizability \(\alpha\) in cubic Angstroms.
The rotational relaxation collision number \(Z_rot\) at 298K.
After the last number, a comment field can be enclosed in parenthesis.
Helper functions¶
- rmgpy.chemkin.get_species_identifier()¶
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.write_kinetics_entry()¶
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 java_library = True in order to generate a kinetics entry suitable for an RMG-Java kinetics library.
- rmgpy.chemkin.write_thermo_entry()¶
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.mark_duplicate_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.