Skip to content

Commit

Permalink
Use the new uncertainty_si property to fix units bug in saving old da…
Browse files Browse the repository at this point in the history
…tabase rules.

This should close @GreenGroup/RMG-databaseReactionMechanismGenerator#21 ReactionMechanismGenerator/RMG-database#21
But there are probably other places the same bug exists (i.e. foo.uncertainty should be replaced
with foo.uncertainty_si)

Also, why don't any of the Quantity unit tests check uncertainties at all? Hmm...
  • Loading branch information
rwest committed Aug 29, 2013
1 parent f7beb20 commit fed3b59
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rmgpy/data/kinetics/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ def saveOld(self, path, groups):
entry.data.E0.value_si / 4184.
))
if entry.data.A.isUncertaintyMultiplicative():
flib.write('*{0:<6g} '.format(entry.data.A.uncertainty))
flib.write('*{0:<6g} '.format(entry.data.A.uncertainty_si))
else:
flib.write('{0:<7g} '.format(entry.data.A.uncertainty * factor))
flib.write('{0:<7g} '.format(entry.data.A.uncertainty_si * factor))
flib.write('{0:6g} {1:6g} {2:6g} '.format(
entry.data.n.uncertainty,
entry.data.alpha.uncertainty,
entry.data.E0.uncertainty / 4184.
entry.data.n.uncertainty_si,
entry.data.alpha.uncertainty_si,
entry.data.E0.uncertainty_si / 4184.
))

if not entry.rank:
Expand Down

0 comments on commit fed3b59

Please sign in to comment.