Skip to content

Commit 42e1ddc

Browse files
committed
allow running enlarge on species that are already in core
this is exclusively for initial species that may be added to core during seed mech addition
1 parent 98cf29d commit 42e1ddc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rmgpy/rmg/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,10 @@ def enlarge(self, new_object=None, react_edge=False, unimolecular_react=None, bi
635635
display(new_species) # if running in IPython --pylab mode, draws the picture!
636636

637637
# Add new species
638-
reactions_moved_from_edge = self.add_species_to_core(new_species)
638+
if new_species not in self.core.species:
639+
reactions_moved_from_edge = self.add_species_to_core(new_species)
640+
else:
641+
reactions_moved_from_edge = []
639642

640643
elif isinstance(new_object, tuple) and isinstance(new_object[0], PDepNetwork) and self.pressure_dependence:
641644
pdep_network, new_species = new_object

0 commit comments

Comments
 (0)