From ccbfef9d7e5c8eb8254bdbd81a266cf110a83f01 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Sat, 23 Feb 2019 15:36:57 -0500 Subject: [PATCH] Write comments with thermo and reaction sources to Arkane pdep output files --- arkane/pdep.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arkane/pdep.py b/arkane/pdep.py index 977221ba2d7..23df9d7732c 100644 --- a/arkane/pdep.py +++ b/arkane/pdep.py @@ -455,7 +455,24 @@ def save(self, outputFile): Plist = self.Plist.value_si Tcount = Tlist.shape[0] Pcount = Plist.shape[0] - + + f.write("#Thermo used: \n") + spcs = [] + for rxn in self.network.pathReactions: + spcs.extend(rxn.reactants) + spcs.extend(rxn.products) + for spc in spcs: + if spc.thermo: + f.write("#"+spc.label+" SMILES: "+spc.molecule[0].toSMILES()+"\n") + f.write("#"+spc.thermo.comment+"\n") + f.write("\n#Path Reactions used: \n") + for rxn in self.network.pathReactions: + if rxn.kinetics: + f.write("#"+str(rxn)+"\n") + for s in rxn.kinetics.comment.split("\n"): + f.write("#"+s+"\n") + f.write("\n") + count = 0 printed_reactions = [] # list of rxns already printed for prod in range(Nprod):