Skip to content

Commit b772183

Browse files
committed
Move library to edge before adding initial species to core to make sure library reactions get move to core if all reactants and products are in initial species
1 parent 54775a8 commit b772183

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rmgpy/rmg/main.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,11 @@ def initialize(self, **kwargs):
614614

615615
# Initialize reaction model
616616

617+
# Reaction libraries: add species and reactions from reaction library to the edge so
618+
# that RMG can find them if their rates are large enough
619+
for library, option in self.reaction_libraries:
620+
self.reaction_model.add_reaction_library_to_edge(library)
621+
617622
# Also always add in a few bath gases (since RMG-Java does)
618623
for label, smiles in [('Ar', '[Ar]'), ('He', '[He]'), ('Ne', '[Ne]'), ('N2', 'N#N')]:
619624
molecule = Molecule().from_smiles(smiles)
@@ -638,11 +643,6 @@ def initialize(self, **kwargs):
638643
for seed_mechanism in self.seed_mechanisms:
639644
self.reaction_model.add_seed_mechanism_to_core(seed_mechanism, react=False)
640645

641-
# Reaction libraries: add species and reactions from reaction library to the edge so
642-
# that RMG can find them if their rates are large enough
643-
for library, option in self.reaction_libraries:
644-
self.reaction_model.add_reaction_library_to_edge(library)
645-
646646
# Perform species constraints and forbidden species checks on input species
647647
for spec in self.initial_species:
648648
if self.database.forbidden_structures.is_molecule_forbidden(spec.molecule[0]):

0 commit comments

Comments
 (0)