Skip to content

Commit

Permalink
Merge pull request #153 from ReactionMechanismGenerator/drawTemplates
Browse files Browse the repository at this point in the history
Draw reaction templates in convertKineticsLibraryToTrainingReactions
  • Loading branch information
KEHANG authored Jan 4, 2017
2 parents c29901b + 41f95e0 commit c4c4c66
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/convertKineticsLibraryToTrainingReactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@
" template = database.kinetics.families[fam_rxn.family].getReactionTemplate(fam_rxn)\n",
" display(fam_rxn)\n",
" print 'Matched Template: {}'.format([entry.label for entry in template])\n",
" for entry in template:\n",
" group = entry.item\n",
" print entry.label\n",
" display(group)\n",
" print '=================================================='\n",
"\n",
" elif len(fam_rxn_list) == 0:\n",
" print \"Sad :( There are no matches. This is a magic reaction or has chemistry that should be made into a new reaction family\"\n",
Expand All @@ -152,7 +157,7 @@
" print 'Product SMILES:'\n",
" for product in lib_rxn.products:\n",
" print product.molecule[0].toSMILES()\n",
" print '==============='\n",
" print '=================================================='\n",
" else:\n",
" print \"There are multiple RMG matches for this reaction. You have to manually create this training reaction\"\n",
" print ''\n",
Expand All @@ -168,7 +173,7 @@
" print 'The following families were matched:'\n",
" for rxn in fam_rxn_list:\n",
" print rxn.family\n",
" print '==============='\n",
" print '=================================================='\n",
"\n",
"\n"
]
Expand Down

0 comments on commit c4c4c66

Please sign in to comment.