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

BugFix: file_format in ReactionDrawer #1760

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions rmgpy/molecule/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,13 +1638,13 @@ def draw(self, reaction, file_format, path=None):
molecule = reactant.molecule[0]
elif isinstance(reactant, Molecule):
molecule = reactant
reactants.append(MoleculeDrawer().draw(molecule, format))
reactants.append(MoleculeDrawer().draw(molecule, file_format))
for product in reaction.products:
if isinstance(product, Species):
molecule = product.molecule[0]
elif isinstance(product, Molecule):
molecule = product
products.append(MoleculeDrawer().draw(molecule, format))
products.append(MoleculeDrawer().draw(molecule, file_format))

# Next determine size required for surface
rxn_width = rxn_height = rxn_top = 0
Expand Down Expand Up @@ -1738,7 +1738,7 @@ def draw(self, reaction, file_format, path=None):
rxn_x += width

# Finish Cairo drawing
if format == 'png':
if file_format == 'png':
rxn_surface.write_to_png(path)
else:
rxn_surface.finish()