Skip to content

Commit

Permalink
fix bug with duplicate library reactions
Browse files Browse the repository at this point in the history
This sets the rxn.family attribute to the name of the library it was loaded from
rather than the library it was originally from
this prevents reactions in a seed mechanism that were originally from
a reaction library from being duplicated if that reaction library is used
as a reaction library or seed mechanism
  • Loading branch information
mjohnson541 committed Aug 8, 2019
1 parent fabc165 commit 113dcfd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rmgpy/data/kinetics/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def getLibraryReactions(self):
duplicate=entry.item.duplicate, reversible=entry.item.reversible,
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
c = entry._longDesc.split('\n')
family_comments = [i for i in c if 'family: ' in i]
Expand Down

0 comments on commit 113dcfd

Please sign in to comment.