Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "negative_A" option if required in cti files #68

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pymars/soln2cti.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,10 @@ def write(solution, output_filename='', path=''):
raise NotImplementedError(f'Unsupported reaction type: {type(reaction)}')

if reaction.duplicate:
reaction_string += ',\n' + indent[8] + 'options = "duplicate"'
if getattr(reaction, 'allow_negative_pre_exponential_factor', default=False):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the default= so this line is

if getattr(reaction, 'allow_negative_pre_exponential_factor', False):

Copy link
Author

@ajuluc ajuluc Sep 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already made that change on my local version of the solution file. I'll adjust it here on the pull request as well.

reaction_string += ',\n' + indent[8] + 'options = ["negative_A", "duplicate"]'
else:
reaction_string += ',\n' + indent[8] + 'options = "duplicate"'

reaction_string += ')\n\n'
the_file.write(reaction_string)
Expand Down