Skip to content

Commit 0e48892

Browse files
sevyharrisrwest
authored andcommitted
Use precise species name for image file
There can be multiple species that end the same way, so using endswith is not guaranteed to get you the right images. This change makes sure the flux diagrams will map the correct species image onto the flux diagram.
1 parent 8196949 commit 0e48892

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rmgpy/tools/fluxdiagram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def generate_flux_diagram(reaction_model, times, concentrations, reaction_rates,
208208
continue
209209
for root, dirs, files in os.walk(species_directory):
210210
for f in files:
211-
if f.endswith(species_index):
211+
if f == species_index:
212212
image_path = os.path.join(root, f)
213213
break
214214
if os.path.exists(image_path):

0 commit comments

Comments
 (0)