From d137bf2a37d2f638bbe305064d4f50d3fb1a0582 Mon Sep 17 00:00:00 2001 From: Richard West Date: Mon, 28 Mar 2011 18:18:47 -0400 Subject: [PATCH] Mark seed mechanism reactions as being FromPrimaryKineticLibrary It seems that this boolean attribute is used to decide whether the kinetics should be multiplied by the reaction path degeneracy or left alone. The idea being that things from a primary kinetic library were intended to be used "as is" and without further multiplication. This is the case for seed mechanisms, and so I am setting it for all reactions read in from a SeedMechanism reader. (Hopefully the Restart features which use the SeedMechanisme.read function have written the multiplied kinetics?) NB. This commit 'fixes' it in an ugly way - making all calls to the read[Pdep]Reactions() method pass a 'true' boolean for the 'pkl' parameter. However, the nicer fix - remove the parameter - which is is done on the seedmech branch, requires some refactoring of the underlying code. --- source/RMG/jing/rxn/ReactionLibrary.java | 4 ++-- source/RMG/jing/rxnSys/SeedMechanism.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/RMG/jing/rxn/ReactionLibrary.java b/source/RMG/jing/rxn/ReactionLibrary.java index 2fdfc42f..41fad387 100644 --- a/source/RMG/jing/rxn/ReactionLibrary.java +++ b/source/RMG/jing/rxn/ReactionLibrary.java @@ -134,8 +134,8 @@ public void read(String p_directoryName, String p_name) throws IOException { SeedMechanism sm = new SeedMechanism(); dictionary.putAll(sm.readSpecies(dictionaryFile,p_name,"ReactionLibrary: ")); - library.addAll(sm.readReactions(libraryFile,p_name,dictionary,"ReactionLibrary: ",false)); - library.addAll(sm.readPdepReactions(pdeplibraryFile,p_name,dictionary,"ReactionLibrary: ",false)); + library.addAll(sm.readReactions(libraryFile,p_name,dictionary,"ReactionLibrary: ",true)); + library.addAll(sm.readPdepReactions(pdeplibraryFile,p_name,dictionary,"ReactionLibrary: ",true)); return; } diff --git a/source/RMG/jing/rxnSys/SeedMechanism.java b/source/RMG/jing/rxnSys/SeedMechanism.java index 92dbf8c0..c014e900 100644 --- a/source/RMG/jing/rxnSys/SeedMechanism.java +++ b/source/RMG/jing/rxnSys/SeedMechanism.java @@ -121,15 +121,15 @@ public void read(String p_directoryName, boolean p_fromRestart, String seedMechN String pdepreactionFile = p_directoryName + "pdepreactions.txt"; speciesSet.putAll(readSpecies(speciesFile,seedMechName,"Seed Mechanism: ")); - reactionSet.addAll(readReactions(reactionFile,seedMechName,speciesSet,"Seed Mechanism: ",false)); - reactionSet.addAll(readPdepReactions(pdepreactionFile,seedMechName,speciesSet,"Seed Mechanism: ",false)); + reactionSet.addAll(readReactions(reactionFile,seedMechName,speciesSet,"Seed Mechanism: ",true)); + reactionSet.addAll(readPdepReactions(pdepreactionFile,seedMechName,speciesSet,"Seed Mechanism: ",true)); } else { String speciesFile = p_directoryName + "coreSpecies.txt"; String pdepreactionFile = p_directoryName + "pdepreactions.txt"; speciesSet.putAll(readSpecies(speciesFile,seedMechName,"Seed Mechanism: ")); - reactionSet.addAll(readPdepReactions(pdepreactionFile,seedMechName,speciesSet,"Seed Mechanism: ",false)); + reactionSet.addAll(readPdepReactions(pdepreactionFile,seedMechName,speciesSet,"Seed Mechanism: ",true)); } return; }