Skip to content

Commit

Permalink
fix species_to_dict function to use correct parameter as rxn species
Browse files Browse the repository at this point in the history
  • Loading branch information
ntietje1 committed Jun 8, 2024
1 parent feb70e2 commit 4a82743
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rmgpy/cantera_.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,18 @@ def reaction_to_dicts(obj, spcs):

def species_to_dict(obj, spc, names=None, label="solvent"):
"""
Takes an RMG species object (spc), returns a list of dictionaries
Takes an RMG species object (obj), returns a list of dictionaries
for YAML properties. Also adds in the number of surface sites
('sites') to dictionary.
"""

result_dict = dict()

if isinstance(spc, Species):
s = spc.to_cantera(use_chemkin_identifier=True)
if isinstance(obj, Species):
s = obj.to_cantera(use_chemkin_identifier=True)
species_data = s.input_data
try:
result_dict["note"] = spc.transport_data.comment
result_dict["note"] = obj.transport_data.comment
except:
pass
if "size" in species_data:
Expand All @@ -324,6 +324,8 @@ def species_to_dict(obj, spc, names=None, label="solvent"):
return (
species_data # returns composition, name, thermo, and transport, and note
)
else:
raise Exception("Species object must be an RMG Species object")


class CanteraWriter(object):
Expand Down

0 comments on commit 4a82743

Please sign in to comment.