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

deltaGerr automatically sets to 2.0 after loading thermo model #30

Closed
remidhum opened this issue Jun 3, 2019 · 2 comments
Closed

deltaGerr automatically sets to 2.0 after loading thermo model #30

remidhum opened this issue Jun 3, 2019 · 2 comments
Assignees

Comments

@remidhum
Copy link
Contributor

remidhum commented Jun 3, 2019

Uppon loading the model, the deltaGerr values are set to 2.0:

tmodel = load_json_model('../tmodels/outputs/tmodel.json')

In the .json file, the deltaGerr values are correctly set to 0.0.

The model is loaded after setting the deltaGerr of reactions to 0.0 and exporting the model:

for rxn in model.reactions:
    rxn.thermo['deltaGRerr'] = 0.0

#...

save_json_model(tmodel, './outputs/tmodel.json')
psalvy added a commit that referenced this issue Jun 3, 2019
@psalvy
Copy link
Member

psalvy commented Jun 3, 2019

Adding another piece of info from your email:

I have checked the .json and all the values of deltaGRerr are correctly set to 0.0 before export.
To me, this shows the issue probably kicks in when loading or preparing the model.

I added an option for model.prepare() in the latest dev commit (bda04e7): null_error_override.

This parameter gives its value to all DeltaG_err that are equal to 0, and is defaulted to 2 kcal/mol to preserve the behavior of previous versions. If you set it to 0, no change will be done to the already existing DeltaGerr.
If you edit your preparation line to model.prepare(null_error_override = 0), you should get the desired result.

Let me know if this works for you

Cheers,
Pierre

@psalvy psalvy self-assigned this Jun 3, 2019
@remidhum
Copy link
Contributor Author

remidhum commented Jun 5, 2019

This works perfectly for me.
Thank you!

@psalvy psalvy closed this as completed Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants