Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create YAML file outputs in RMG for use in Cantera #2321

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rmgpy/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ def is_balanced(self):
from rmgpy.molecule.element import element_list
from rmgpy.molecule.fragment import CuttingLabel, Fragment

cython.declare(reactant_elements=dict, product_elements=dict, molecule=Graph, atom=Vertex, element=Element,
cython.declare(reactant_elements=dict, product_elements=dict, molecule=Molecule, atom=Atom, element=Element,
reactants_net_charge=cython.int, products_net_charge=cython.int)

reactant_elements = {}
Expand Down
6 changes: 4 additions & 2 deletions rmgpy/rmg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
from rmgpy.thermo.thermoengine import submit
from rmgpy.tools.plot import plot_sensitivity
from rmgpy.tools.uncertainty import Uncertainty, process_local_results
from rmgpy.yml import RMSWriter
from rmgpy.yaml_rms import RMSWriter
from rmgpy.yaml_cantera import CanteraWriter
from rmgpy.rmg.reactors import Reactor

################################################################################
Expand Down Expand Up @@ -757,6 +758,7 @@ def register_listeners(self):

self.attach(ChemkinWriter(self.output_directory))
self.attach(RMSWriter(self.output_directory))
self.attach(CanteraWriter(self.output_directory))

if self.generate_output_html:
self.attach(OutputHTMLWriter(self.output_directory))
Expand Down Expand Up @@ -1788,7 +1790,7 @@ def generate_cantera_files(self, chemkin_file, **kwargs):
"""
transport_file = os.path.join(os.path.dirname(chemkin_file), "tran.dat")
file_name = os.path.splitext(os.path.basename(chemkin_file))[0] + ".yaml"
out_name = os.path.join(self.output_directory, "cantera", file_name)
out_name = os.path.join(self.output_directory, "cantera_from_ck", file_name)
if "surface_file" in kwargs:
out_name = out_name.replace("-gas.", ".")
cantera_dir = os.path.dirname(out_name)
Expand Down
Loading
Loading