Skip to content

Commit c586870

Browse files
alongdmjohnson541
authored andcommitted
Fixed info of reaction type to PDep network files
Relocated the library comment from Reaction to kinetics
1 parent 41fa4fe commit c586870

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

rmgpy/cantherm/pdep.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,11 @@ def saveInputFile(self, path):
629629
f.write(' products = [{0}],\n'.format(', '.join([repr(str(spec)) for spec in rxn.products])))
630630
f.write(' transitionState = {0!r},\n'.format(rxn.transitionState.label))
631631
if rxn.kinetics is not None:
632+
if isinstance(rxn, LibraryReaction) and 'Reaction library:' not in rxn.kinetics.comment:
633+
rxn.kinetics.comment += 'Reaction library: {0!r}'.format(rxn.library)
632634
f.write(' kinetics = {0!r},\n'.format(rxn.kinetics))
633635
if ts.tunneling is not None:
634636
f.write(' tunneling = {0!r},\n'.format(ts.tunneling.__class__.__name__))
635-
if isinstance(rxn,LibraryReaction):
636-
f.write(' comment = "Library reaction: {0!r}",\n'.format(rxn.library))
637-
else:
638-
f.write(' comment = "Template reaction: {0!r}",\n'.format(rxn.family))
639637
f.write(')\n\n')
640638

641639
# Write network

0 commit comments

Comments
 (0)