Skip to content

Commit 4e072c3

Browse files
authored
Merge pull request #2358 from ReactionMechanismGenerator/fixadditionalexplorernetworks
Pdep Explorer Multinetwork fixes
2 parents f366048 + 7f26746 commit 4e072c3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

arkane/explorer.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ def execute(self, output_file, plot, file_format='pdf', print_summary=True, spec
250250
for rxn in network.path_reactions:
251251
if rxn.transition_state is None:
252252
if rxn.network_kinetics is None:
253-
E0 = sum([spec.conformer.E0.value_si for spec in rxn.reactants]) + rxn.kinetics.Ea.value_si
253+
E0 = sum([spec.conformer.E0.value_si for spec in rxn.reactants]) + rxn.kinetics.Ea.value_si + network.energy_correction
254254
else:
255-
E0 = sum([spec.conformer.E0.value_si for spec in rxn.reactants]) + rxn.network_kinetics.Ea.value_si
255+
E0 = sum([spec.conformer.E0.value_si for spec in rxn.reactants]) + rxn.network_kinetics.Ea.value_si + network.energy_correction
256256
rxn.transition_state = rmgpy.species.TransitionState(conformer=Conformer(E0=(E0 * 0.001, "kJ/mol")))
257257

258258
for network in self.networks:
@@ -266,6 +266,10 @@ def execute(self, output_file, plot, file_format='pdf', print_summary=True, spec
266266
logging.info('Removing forbidden reaction: {0}'.format(rxn))
267267
network.path_reactions.remove(rxn)
268268

269+
if len(rm_rxns) > 0:
270+
network.valid = False
271+
network.update(reaction_model,reaction_model.pressure_dependence)
272+
269273
# clean up output files
270274
if output_file is not None:
271275
path0 = os.path.join(reaction_model.pressure_dependence.output_file, 'pdep')
@@ -291,6 +295,8 @@ def execute(self, output_file, plot, file_format='pdf', print_summary=True, spec
291295

292296
# reduction process
293297
for network in self.networks:
298+
network.valid = False
299+
network.update(reaction_model,reaction_model.pressure_dependence)
294300
if self.energy_tol != np.inf or self.flux_tol != 0.0:
295301

296302
rxn_set = None
@@ -333,6 +339,8 @@ def execute(self, output_file, plot, file_format='pdf', print_summary=True, spec
333339

334340
self.networks = networks
335341
for p, network in enumerate(self.networks):
342+
network.valid = False
343+
network.update(reaction_model,reaction_model.pressure_dependence)
336344
self.pdepjob.network = network
337345

338346
if len(self.networks) > 1:

0 commit comments

Comments
 (0)