Skip to content

Commit

Permalink
skip parsing template and library reaction if the library isn't autog…
Browse files Browse the repository at this point in the history
…enerated
  • Loading branch information
mjohnson541 committed Aug 8, 2019
1 parent 113dcfd commit bb03517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmgpy/data/kinetics/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def getLibraryReactions(self):
"""
rxns = []
for entry in self.entries.values():
if entry._longDesc and 'Originally from reaction library: ' in entry._longDesc:
if self.autoGenerated and entry._longDesc and 'Originally from reaction library: ' in entry._longDesc:
lib = [line for line in entry._longDesc.split('\n') if 'Originally from reaction library: ' in line]
lib = lib[0].replace('Originally from reaction library: ','')
lib = lib.replace('\n','')
Expand All @@ -246,7 +246,7 @@ def getLibraryReactions(self):
allow_pdep_route=entry.item.allow_pdep_route,
elementary_high_p=entry.item.elementary_high_p)
rxn.family = self.label #the library the reaction was loaded from (opposed to originally from)
elif entry._longDesc and 'rate rule' in entry._longDesc: #template reaction
elif self.autoGenerated and entry._longDesc and 'rate rule' in entry._longDesc: #template reaction
c = entry._longDesc.split('\n')
family_comments = [i for i in c if 'family: ' in i]
familyname = family_comments[0].replace('family: ','')
Expand Down

0 comments on commit bb03517

Please sign in to comment.