Repository navigation
Closed
Labels
ArkaneStatus: StaleThis issue is out-of-date and may no longer be applicablestalestale issue/PR as determined by actions bot
Description
Not sure what's going on here, but the methylformate example job dies with this:
Merging PDepNetwork #41809 and PDepNetwork #41810
Updating 2 modified unimolecular reaction networks...
========================================================================
Network Information (Network #41809)
-------------------
Isomers:
H2CCCH(68) 347.693 kJ/mol
CC#[C](459) 509.242 kJ/mol
C1C=[C]1(4491) 513.113 kJ/mol
Reactant channels:
H(17) + C3H2(69) 703.529 kJ/mol
H(17) + [CH2]C#[C](2238) 756.717 kJ/mol
CH3(10) + C2(40) 968.493 kJ/mol
Product channels:
H(17) + C1=C=C1(14986) 706.706 kJ/mol
H(17) + C1=[C][CH]1(14987) 826.518 kJ/mol
H(17) + C1[C]=[C]1(14988) 988.462 kJ/mol
[CH]1C=C1(14989) 377.133 kJ/mol
Path reactions:
H2CCCH(68) <=> H(17) + C3H2(69) 675.915 kJ/mol
H(17) + [CH2]C#[C](2238) <=> H2CCCH(68) 756.717 kJ/mol
H2CCCH(68) <=> C1C=[C]1(4491) 573.629 kJ/mol
CC#[C](459) <=> H2CCCH(68) 654.052 kJ/mol
CH3(10) + C2(40) <=> CC#[C](459) 968.493 kJ/mol
H(17) + [CH2]C#[C](2238) <=> CC#[C](459) 756.717 kJ/mol
H(17) + C1=C=C1(14986) <=> C1C=[C]1(4491) 718.839 kJ/mol
H(17) + C1=[C][CH]1(14987) <=> C1C=[C]1(4491) 826.518 kJ/mol
H(17) + C1[C]=[C]1(14988) <=> C1C=[C]1(4491) 988.462 kJ/mol
C1C=[C]1(4491) <=> [CH]1C=C1(14989) 657.923 kJ/mol
========================================================================
Calculating densities of states for Network #41809...
Using 458 grains from 347.69 to 2042.67 kJ/mol in steps of 3.71 kJ/mol to compute densities of states
Calculating phenomenological rate coefficients for Network #41809...
Using 200 grains from 347.69 to 1085.77 kJ/mol in steps of 3.71 kJ/mol to compute the k(T,P) values at 292.578 K
Error: For path reaction H2CCCH(68) <=> H(17) + C3H2(69):
Error: Expected kf(292.578 K) = 1.31499e-46
Error: Actual kf(292.578 K) = 5.23653e-49
Error: Expected Keq(292.578 K) = 2.85228e-57
Error: Actual Keq(292.578 K) = 2.85228e-57
Traceback (most recent call last):
File "rmg.py", line 134, in <module>
cProfile.runctx(command, global_vars, local_vars, stats_file)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cProfile.py", line 49, in runctx
prof = prof.runctx(statement, globals, locals)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cProfile.py", line 140, in runctx
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/rmg/main.py", line 388, in execute
self.reactionModel.enlarge(objectsToEnlarge)
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/rmg/model.py", line 636, in enlarge
self.updateUnimolecularReactionNetworks(database)
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/rmg/model.py", line 1290, in updateUnimolecularReactionNetworks
network.update(self, database, self.pressureDependence)
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/rmg/pdep.py", line 443, in update
K = self.calculateRateCoefficients(Tlist, Plist, method, grainSize=grainSize, grainCount=grainCount)
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/measure/network.py", line 852, in calculateRateCoefficients
self.setConditions(T, P)
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/measure/network.py", line 761, in setConditions
self.calculateMicrocanonicalRates()
File "/Users/rwest/Code/rmgpy/RMG-Py/rmgpy/measure/network.py", line 613, in calculateMicrocanonicalRates
raise NetworkError('Invalid k(E) values computed for path reaction "{0}" do not satisfy'.format(rxn))
rmgpy.measure.network.NetworkError: Invalid k(E) values computed for path reaction "H2CCCH(68) <=> H(17) + C3H2(69)" do not satisfyMeasure input file for network 41809 is at https://gist.github.com/2910382
Metadata
Metadata
Assignees
Labels
ArkaneStatus: StaleThis issue is out-of-date and may no longer be applicablestalestale issue/PR as determined by actions bot
Activity
rwest commentedon Jun 19, 2012
I am still getting this after a trial merge of the 'molecule' branch.
(But with the faster pdep it now only takes 6 hours to reach that point)
rwest commentedon Jul 19, 2012
@faribas has now come across a job which runs into this problem within a couple of minutes of starting.
@jwallen, does your commit 406b3d8 suggest you've been having trouble here also, but in a slightly different context?
rwest commentedon Jul 19, 2012
So the kf values are an order of magnitude apart, but those are very small numbers (whatever the units may be). What is the machine precision? Are they really different?
jwallen commentedon Jul 20, 2012
Yes, I still see this more often than I would like. Some of the error is probably just due to discretization, but I don't think that explains a full order of magnitude. This is especially true when using ILT to go from k(T) -> k(E), which by definition should give you the same k(T) at the end. (This assumes that Ea and the barrier height are the same, which is what we're usually assuming in RMG jobs.) Feel free to send me a few networks that are known to have the issue.
I've never really thought about machine precision being an issue. Now that you mention it, that could be problematic, since the formula is k(E) = A * rho(E - Ea) / rho(E), where rho(E) is the reactant density of states. For large Ea - as in this case - the ratio rho(E - Ea) / rho(E) is dividing a small number by a big number, which could be troublesome. I'll think about this some more; it may be that we don't care about this issue when the kf is negligible.
Looking at the first example in the thread, I see that the barrier height is negative. Not sure if RMG-Py handles this correctly, especially because I'm not really sure how it should be handled.
rwest commentedon Jul 20, 2012
The first example in the thread is also very small kf: 1.31499e-46.
I think the last example in the thread is just the decomposition of
but I'll send you an input file.
rwest commentedon Jul 21, 2012
Just realized that although in all these cases the kf is very small (which still hints at numerical error accumulation?) a very small Keq means that the reverse rate could in fact be significant and important to get right?
Implementing an "ignore this problem if both kf and kr are less then 1e30" allows the Hyad example to get past the first problem, and run straight into another one:
But what is "small" for a rate coefficient anyway? Are these even always in the same units (eg. all bimolecular?)
faribas commentedon Jul 26, 2012
The 'sean-v8@26fbe21' still not working, I got the same error:
I changed cutoff to e-15, but again job crashed for the same reason:
rwest commentedon Jul 27, 2012
Yes, even allowing relatively large discrepancies only seems to delay the inevitable
See the commit comments on @stroiano's branch: sean-v8/RMG-Py@master...kE-bypass
I'm still not sure how large is OK though, or if something worse is at play.
Increase critical 'n' value below which T^n is ignored in inverseLapl…
rwest commentedon Feb 27, 2013
In commit 22f4dd3 I made it so that if it gets an invalid k(E) error, it tries again with twice as many grains. This seemed to help a lot, but running the methylformate example, it runs for three hours, then this happens:
Those attempts take about another 3 hours, then it crashes.
Profiling data suggests the job spent 60% of its time in
{method 'mapDensityOfStates' of 'rmgpy.pdep.configuration.Configuration' objects}We need a strategy for when adding more grains doesn't help.
jwallen commentedon Feb 27, 2013
Clearly increasing the number of grains is not helping in this system, as the actual kf barely changes at all. This suggests a real (not a numerical) error. If you can send me the network I'll see if I can identify what's going on.
jwallen commentedon Feb 27, 2013
The problem with this particular network is that the reaction H2CCCH(65)<=>C3H2(60)+H(17), coming from Glarborg/C2, has an activation energy that is ~20 kcal/mol below the barrier height (as estimated from the enthalpy of reaction). Using the ILT method to get k(E) requires that the activation energy and the barrier height be the same. Since the k(T) estimate came from a library instead of an estimate, its Ea was not adjusted to be at least dHrxn.
Incidentally, the thermo for all of these species is coming from DFT_QCI_thermo, so it's not a group additivity estimate.
I'm not quite sure what the appropriate course of action is.
rwest commentedon Feb 27, 2013
One thing we can do is ensure that increasing the number of grains is getting us closer to an acceptable k.

In this case it clearly wasn't (in fact, the numerical inaccuracies were making it better at the start) and we could have stopped and thrown an exception sooner.
What to do with such an exception, or how to avoid it in the first place, however, is still unclear.
7 remaining items
rwest commentedon Apr 21, 2013
What should we do with
rmgpy.kinetics.arrhenius.MultiArrheniuskinetics in a highP library?Ensure each indidividual Arrhenius has Ea sufficiently high? (What do we do with them when we're about to run them through PDep?)
jwallen commentedon Apr 21, 2013
If that reaction is not going to be treated as pressure-dependent, then we can leave it as-is. For pressure dependence I think we'll have to fit a single Arrhenius so that we can have a single barrier height. So I guess do that and then adjust the resulting Ea if necessary?
rwest commentedon Apr 21, 2013
If it's in a Reaction Library, it'll be forced through PDep. Do we turn everything into Arrhenius at that point? (I guess we could pre-emptively do it when loading the reaction library).
I see around line 473 of rmgpy/rmg/pdep.py
So it looks like everything is expected to be KineticsData or Arrhenius by that point, but I'm not sure where it'd be converted if it started as MultiArrhenius.
Do seed mechanisms avoid the PDep code entirely? (i.e. should this checking not be done for them?)
rwest commentedon Apr 21, 2013
Commit 8aa385d checks for convergence inside the "add more grains" loop.
This should avoid the endless loop in the case of a systematic error. It now just aborts the RMG Job.
(Perhaps there is a more graceful way to recover, but for now we want to reveal the bugs and fix them)
rwest commentedon Apr 23, 2013
I've found what happens to MultiArrhenius reactions in a reaction library... They die:
rwest commentedon Apr 30, 2013
I've made a .toArrhenius() method for MultiArrhenius kinetics. When do you think this should be called, @jwallen ? The place I had put the call to fixBarrierHeight() when adding reaction libraries to the edge does not seem to catch any MultiArrhenius kinetics.
rwest commentedon May 1, 2013
Think I have fixed this. Decided to implement it within the PDepNetwork code.
Hopefully that's this issue closed!! (for now)
Force barriers to be >=0 for all reactions that are run through PDep …
Raise barriers for Library and Seed reactions to avoid PDep problem.
Check that error is improving before endlessly adding grains to PDep …
github-actions commentedon Jun 22, 2023
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.