RMG-Py icon indicating copy to clipboard operation
RMG-Py copied to clipboard

RMG simulation is stuck and does not move any further

Open shikharnigam8 opened this issue 4 years ago • 10 comments

Bug Description

I am trying to simulate the mechanism for higher hydrocarbon compounds. However, I noticed that the simulation is stuck and does not move further. There is no error in the input, reaction families /libraries and thermodata. Please suggest what could be the reason for such behavior.

How To Reproduce

The error snapshot is attached.

Expected Behavior

Simulation should produce more reactions.

Installation Information

OS (include version if known): Ubuntu
Installation method: Source with anaconda
RMG version information:
    RMG-Py: Latest version
    RMG-database: Latest database

Additional Context

Add any other context about the problem here. Summary of Model Enlargement

Added 1 new core species O2(2) Created 0 new edge species Moved 158 reactions from edge to core O2(2) + h(9) <=> o(33) + oh(4) o(33) + o(33) <=> O2(2) O2(2) + h(9) <=> ho2(32) o(33) + ho2(32) <=> O2(2) + oh(4) ho2(32) + ho2(32) <=> O2(2) + h2o2(34) O2(2) + ch3oh(39) <=> ho2(32) + ch2oh(82) ho2(32) + ch3(11) <=> O2(2) + ch4(37) O2(2) + ch3(11) <=> o(33) + ch3o(38) O2(2) + ch3(11) <=> ch3o2(40) ho2(32) + ch3o2(40) <=> O2(2) + ch3o2h(41) ch3o2(40) + ch3o2(40) => O2(2) + ch3o(38) + ch3o(38) o(33) + ch3o2(40) <=> O2(2) + ch3o(38) oh(4) + ch3o2(40) <=> O2(2) + ch3oh(39) O2(2) + ch2(s)(83) <=> oh(4) + hco(35) O2(2) + ch2(s)(83) => h(9) + h(9) + co2(187) O2(2) + ch(94) <=> o(33) + hco(35) O2(2) + c2h6(43) <=> ho2(32) + c2h5(42) O2(2) + ch3ch2o(229) <=> ho2(32) + ch3cho(61) ho2(32) + c2h5o2(85) <=> O2(2) + c2h5o2h(107) O2(2) + ch3cho(61) <=> ho2(32) + ch3co(15) O2(2) + c2h4(27) <=> ho2(32) + c2h3(18) O2(2) + c2h5oh(227) <=> ho2(32) + pc2h4oh(288) O2(2) + c2h5oh(227) <=> ho2(32) + ch3choh(228) O2(2) + ch3coch3(196) <=> ho2(32) + ch3coch2(224) O2(2) + c2h3cho(76) <=> ho2(32) + c2h3co(57) O2(2) + c2h5cho(154) <=> ho2(32) + c2h5co(164) O2(2) + c3h8(108) <=> ho2(32) + ic3h7(100) O2(2) + c3h8(108) <=> ho2(32) + nc3h7(109) O2(2) + nc3h7(109) <=> ho2(32) + c3h6(95) O2(2) + c3h5-s(92) <=> o(33) + ch3coch2(224) O2(2) + c3h5-s(92) <=> ch2o(36) + ch3co(15) O2(2) + c3h5-s(92) <=> ho2(32) + c3h4-a(88) O2(2) + c3h4-a(88) <=> ho2(32) + c3h3(12) O2(2) + c3h4-p(87) <=> ho2(32) + c3h3(12) O2(2) + c3h3(12) <=> hco(35) + ch2co(16) ch3o2(40) + nc3h7o2(110) => O2(2) + ch3o(38) + nc3h7o(162) c2h5o2(85) + nc3h7o2(110) => O2(2) + ch3ch2o(229) + nc3h7o(162) nc3h7o2(110) + nc3h7o2(110) => O2(2) + nc3h7o(162) + nc3h7o(162) O2(2) + nc4h10(167) <=> ho2(32) + pc4h9(137) O2(2) + nc4h10(167) <=> ho2(32) + sc4h9(153) O2(2) + c4h7-4(68) <=> ho2(32) + c4h6(101) ho2(32) + nc4h5(69) <=> O2(2) + c4h6(101) O2(2) + nc4h5(69) <=> o(33) + c2h3chcho(179) O2(2) + nc4h5(69) <=> hco(35) + c2h3cho(76) ho2(32) + ic4h5(14) <=> O2(2) + c4h6(101) O2(2) + ic4h5(14) <=> ch2co(16) + ch2cho(77) O2(2) + ic4h3(17) <=> hcco(73) + ch2co(16) O2(2) + c2h5coch3(237) <=> ho2(32) + ch3chcoch3(90) O2(2) + c2h5coch3(237) <=> ho2(32) + acetoch2(238) O2(2) + nc3h7cho(172) <=> ho2(32) + nc3h7co(173) O2(2) + ic4h10(242) <=> ho2(32) + ic4h9(118) O2(2) + ic4h10(242) <=> ho2(32) + tc4h9(302) O2(2) + tc4h9(302) <=> ho2(32) + ic4h8(116) O2(2) + ic4h9(118) <=> ho2(32) + ic4h8(116) O2(2) + ic4h9o(175) <=> ho2(32) + ic3h7cho(235) O2(2) + ic3h7cho(235) <=> ho2(32) + ic3h7co(194) ho2(32) + ic3h6cho(114) <=> O2(2) + ic3h7cho(235) O2(2) + c3h5oh(291) <=> ho2(32) + ch2cch2oh(104) O2(2) + c6h6(81) <=> ho2(32) + c6h5(22) O2(2) + c6h5(22) <=> o(33) + c6h5o(246) O2(2) + c6h5oh(245) <=> ho2(32) + c6h5o(246) O2(2) + cpd(55) <=> ho2(32) + c5h5(105) O2(2) + c5h7(75) <=> ch2cho(77) + c2h3cho(76) O2(2) + c6h1015(247) <=> ho2(32) + c6h9153(248) O2(2) + ic4h8(116) <=> ho2(32) + ic4h7(117) O2(2) + ic3h5cho(289) <=> ho2(32) + ic3h5co(290) O2(2) + nc5h12(176) <=> ho2(32) + c5h11-1(148) O2(2) + nc5h12(176) <=> ho2(32) + c5h11-2(119) O2(2) + nc5h12(176) <=> ho2(32) + c5h11-3(177) O2(2) + c5h10-1(23) <=> ho2(32) + c5h914(120) O2(2) + c5h10-1(23) <=> ho2(32) + c5h915(71) O2(2) + c5h11-1(148) <=> ho2(32) + c5h10-1(23) O2(2) + c5h11-2(119) <=> ho2(32) + c5h10-1(23) O2(2) + ch(94) <=> h(9) + co2(187) O2(2) + ch2(s)(83) <=> h2(10) + co2(187) O2(2) + ch2(s)(83) <=> h(9) + oh(4) + co(24) O2(2) + ch2(s)(83) <=> h2o(6) + co(24) O2(2) + ch2(s)(83) <=> o(33) + ch2o(36) O2(2) + c2h(96) <=> co2(187) + ch(94) O2(2) + h(9) + h2o(6) <=> ho2(32) + h2o(6) O2(2) + c2h(96) <=> o(33) + hcco(73) O2(2) + c5h5(105) <=> oh(4) + c5h4o(106) O2(2) + ch2cho(77) <=> ho2(32) + ch2co(16) O2(2) + c3h5-a(19) <=> ch2o(36) + ch3co(15) O2(2) + ic3h7(100) <=> ho2(32) + c3h6(95) O2(2) + c4h8-1(152) <=> ho2(32) + c4h7-4(68) O2(2) + c6h1116(252) <=> ho2(32) + c6h1013(129) O2(2) + c6h12-1(126) <=> ho2(32) + c6h1116(252) O2(2) + c6h13-1(123) <=> ho2(32) + c6h12-1(126) O2(2) + c6h13-2(124) <=> ho2(32) + c6h12-1(126) O2(2) + c6h13-3(125) <=> ho2(32) + c6h12-1(126) O2(2) + nc6h14(122) <=> ho2(32) + c6h13-1(123) O2(2) + nc6h14(122) <=> ho2(32) + c6h13-2(124) O2(2) + nc6h14(122) <=> ho2(32) + c6h13-3(125) O2(2) + c7h14-1(183) <=> ho2(32) + c7h1317(264) O2(2) + c7h15-1(133) <=> ho2(32) + c7h14-1(183) O2(2) + c7h15-2(134) <=> ho2(32) + c7h14-1(183) O2(2) + c7h15-3(135) <=> ho2(32) + c7h14-1(183) O2(2) + c7h15-4(136) <=> ho2(32) + c7h14-1(183) O2(2) + nc7h16(132) <=> ho2(32) + c7h15-1(133) O2(2) + nc7h16(132) <=> ho2(32) + c7h15-2(134) O2(2) + nc7h16(132) <=> ho2(32) + c7h15-3(135) O2(2) + nc7h16(132) <=> ho2(32) + c7h15-4(136) O2(2) + c8h16-1(184) <=> ho2(32) + c8h1518(276) O2(2) + c8h17-1(144) <=> ho2(32) + c8h16-1(184) O2(2) + c8h17-2(145) <=> ho2(32) + c8h16-1(184) O2(2) + c8h17-3(146) <=> ho2(32) + c8h16-1(184) O2(2) + c8h17-4(147) <=> ho2(32) + c8h16-1(184) O2(2) + nc8h18(143) <=> ho2(32) + c8h17-1(144) O2(2) + nc8h18(143) <=> ho2(32) + c8h17-2(145) O2(2) + nc8h18(143) <=> ho2(32) + c8h17-3(146) O2(2) + nc8h18(143) <=> ho2(32) + c8h17-4(147) Ar + o(33) + o(33) <=> Ar + O2(2) O2(2) + ch(94) <=> o(33) + h(9) + co(24) O2(2) + ch2(93) <=> O2(2) + ch2(s)(83) O2(2) + ch3co(15) <=> ho2(32) + ch2co(16) O2(2) + c5h5(105) <=> hco(35) + c2h2(21) + ch2co(16) oh(4) + oh(4) <=> O2(2) + h2(10) o(33) + h2o(6) <=> O2(2) + h2(10) o(33) + h2o2(34) <=> O2(2) + h2o(6) O2(2) + c2h5(42) <=> c2h5o2(85) O2(2) + c2h3(18) <=> oh(4) + ch2co(16) O2(2) + c2h3(18) <=> h(9) + co(24) + ch2o(36) O2(2) + c2h3(18) <=> co(24) + ch3o(38) O2(2) + c2h3(18) <=> co2(187) + ch3(11) O2(2) + ch3choh(228) <=> ho2(32) + ch3cho(61) O2(2) + nc3h7(109) <=> nc3h7o2(110) O2(2) + ic3h7(100) <=> ic3h7o2(111) O2(2) + c2h3co(57) <=> co2(187) + ch2cho(77) O2(2) + ac3h5cho(178) <=> ho2(32) + ac3h5co(63) O2(2) + ic4h7(117) <=> oh(4) + ic3h5cho(289) O2(2) + ic4h7(117) <=> ch2o(36) + ch3coch2(224) O2(2) + ic4h7(117) <=> oh(4) + ch2o(36) + c3h4-a(88) O2(2) + ic3h6cho(114) <=> ho2(32) + ic3h5cho(289) O2(2) + ic3h6cho(114) <=> oh(4) + co(24) + ch3coch3(196) O2(2) + ch3oh(39) <=> ho2(32) + ch3o(38) O2(2) + c2h2(21) <=> hco(35) + hco(35) O2(2) + c2h(96) <=> h(9) + co(24) + co(24) O2(2) + c2h2oh(97) <=> ho2(32) + hccoh(98) ho2(32) + ch2cho(77) <=> O2(2) + ch3cho(61) O2(2) + ch3co(15) <=> oh(4) + co(24) + ch2o(36) O2(2) + hcco(73) <=> o(33) + co(24) + hco(35) O2(2) + c2o(189) <=> co(24) + co2(187) o(33) + c2h5o2(85) <=> O2(2) + ch3ch2o(229) oh(4) + c2h5o2(85) <=> O2(2) + c2h5oh(227) c2h5o2(85) + c2h5o2(85) <=> O2(2) + ch3ch2o(229) + ch3ch2o(229) c2h5o2(85) + c2h5o2(85) <=> O2(2) + ch3cho(61) + c2h5oh(227) O2(2) + c3h4-p(87) => co(24) + hco(35) + ch3(11) O2(2) + O2(2) + h(9) <=> O2(2) + ho2(32) O2(2) + ch3cho(61) => ho2(32) + co(24) + ch3(11) O2(2) + ch2cho(77) => oh(4) + hco(35) + hco(35) O2(2) + ch2o(36) <=> h(9) + ho2(32) + co(24) O2(2) + c2h2(21) <=> h(9) + co(24) + hco(35) O2(2) + pc2h4oh(288) <=> oh(4) + ch2o(36) + ch2o(36) O2(2) + c2h2oh(97) <=> oh(4) + chocho(86) O2(2) + chocho(86) <=> ho2(32) + choco(166) O2(2) + choco(166) <=> oh(4) + co(24) + co2(187) O2(2) + ocho(190) <=> ho2(32) + co2(187) Added 0 new core reactions Created 0 new edge reactions

After model enlargement: The model core has 312 species and 2212 reactions The model edge has 903 species and 4180 reactions

Initialization complete. Starting model generation.

Generating initial reactions... For reaction generation 1 process is used.

shikharnigam8 avatar May 10 '21 05:05 shikharnigam8

image This snapshot was obtained after changing the tolerance value. Even after leaving the simulation running for many hours, it is still stucked at the same position. What could be the possible reason for this?

shikharnigam8 avatar May 11 '21 07:05 shikharnigam8

Can you share your input file? Or if not at least the model block?

mjohnson541 avatar May 11 '21 20:05 mjohnson541

@mjohnson541 Please find the input file and let me know if you need any additional RMG database. input.zip

shikharnigam8 avatar Aug 08 '21 10:08 shikharnigam8

Okay so some comments on your input file:

Thermo library dumping isn't a big deal although the order matters a whole lot and you should make sure you're ordering them from those you think are most trustworthy to least trustworthy.

Reaction library/seed mechanism dumping can be a bit more dangerous because most of the libraries that aren't already in RMG's training data are either tuned, represent small molecule chemistry or both (otherwise we usually would have added them to RMG's training sets). Using tuned reactions from one mechanism with reactions from other mechanisms or from QM can cause your mechanism to be inaccurate.

You have two options blocks you should delete one. I suspect the second is overriding the first.

Setting maximum Oxygen atoms to two prevents RMG from ever adding oxygen to cyclohexone since that would cause it to have three Oxygens (if you're trying to avoid generating those reactions that's fine).

In the pdep block you're doing 10 temperatures and 100 pressures. I definitely think you can get away with 10 pressures if not even less than that. This might be causing the slow down.

Usually we would recommend running with maximumEdgeSpecies=100000 as long as you have at least 16 GB of RAM.

I highly recommend you set generateOutputHTML=False in the options block. Having it be true causes RMG to regenerate the html every iteration of the model which may be causing the slowdown. You can always generate the final html with a script after the RMG run.

mjohnson541 avatar Aug 09 '21 19:08 mjohnson541

Thanks, Matt for your valuable suggestions. I incorporated them all but still, my simulation is not moving further. And surprisingly it stucks at the same spot always (at 2199 core reactions).

To avoid this scenario, I removed all the seed mechanism libraries and put them in reactionLibrary block. And rest of the input file was kept the same (attached in an earlier comment). But now I am getting an Assertion Error whose message I am pasting below. @rwest @alongd Your kind attention would be much appreciated. Pls, let me know if you need any additional database.

[CH2]C[CH]C(2855) + C4H10a(2857) <=> SC4H9(175) + SC4H9(175) [CH2][CH]CC(2856) + C4H10a(2857) <=> SC4H9(175) + SC4H9(175) SC4H9(175) => CH3(34) + C3H6(T)(2853) SC4H9(175) => h(9) + C[CH][CH]C(2854) SC4H9(175) => h(9) + [CH2]C[CH]C(2855) SC4H9(175) => h(9) + [CH2][CH]CC(2856)

After model enlargement: The model core has 103 species and 814 reactions The model edge has 527 species and 1583 reactions

Saving current model core to Chemkin file... Chemkin file contains 826 reactions. Saving annotated version of Chemkin file... Chemkin file contains 826 reactions. Saving current model core to HTML file... Updating RMG execution statistics... Execution time (DD:HH:MM:SS): 00:01:48:42 Memory used: 1142.44 MB

Attempting to prune... Traceback (most recent call last): File "/home/dr/RMG/RMG-Py/rmg.py", line 118, in main() File "/home/dr/RMG/RMG-Py/rmg.py", line 112, in main rmg.execute(**kwargs) File "/home/dr/RMG/RMG-Py/rmgpy/rmg/main.py", line 954, in execute model_settings.min_species_exist_iterations_for_prune) File "/home/dr/RMG/RMG-Py/rmgpy/rmg/model.py", line 1220, in prune ratios = network.get_leak_branching_ratios(reaction_system.T.value_si, reaction_system.P.value_si) File "/home/dr/RMG/RMG-Py/rmgpy/rmg/pdep.py", line 246, in get_leak_branching_ratios assert rxn.reactants == self.source or rxn.products == self.source AssertionError

shikharnigam8 avatar Aug 26 '21 14:08 shikharnigam8

@mjohnson541 Your valuable comments are always invited.

shikharnigam8 avatar Aug 31 '21 09:08 shikharnigam8

So what's happening is it's trying to do the leak calculations for a pdep network object that only has one path reaction and no net reactions, but the network source somehow isn't either the products or the reactants for that path reaction so it throws an error on the assert. I think it's probably a bug that's triggered by something in one of the reaction libraries you're using that RMG isn't handling properly.

mjohnson541 avatar Aug 31 '21 12:08 mjohnson541

Thanks Matt. Is there anything I can do to remove/get rid off this bug?

shikharnigam8 avatar Aug 31 '21 16:08 shikharnigam8

I'm not really sure what's causing it and I don't have time to look into it right now. I suspect this is associated with a reaction in at least one kinetics library, in which case you could avoid it by not using the associated library or libraries, although without more information I don't know which ones so you'd probably need to run some tests.

mjohnson541 avatar Aug 31 '21 20:08 mjohnson541

I suggest simplifying the input file further. Are you sure you need all those libraries? Try adding just a few libraries that you definitely trust, then see if the generation runs to completion. If it does, gradually add some libraries only if your think they are necessary. After these trials, post any errors you get with an updated input file.

alongd avatar Sep 01 '21 12:09 alongd

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.

github-actions[bot] avatar Jun 21 '23 22:06 github-actions[bot]