Skip to content

Update extract_source_from_comments to grab library object in addition to library name#2963

Open
sevyharris wants to merge 5 commits into
ReactionMechanismGenerator:mainfrom
sevyharris:expand_lib_extract_source
Open

Update extract_source_from_comments to grab library object in addition to library name#2963
sevyharris wants to merge 5 commits into
ReactionMechanismGenerator:mainfrom
sevyharris:expand_lib_extract_source

Conversation

@sevyharris
Copy link
Copy Markdown
Contributor

@sevyharris sevyharris commented May 27, 2026

Dependencies

Motivation or Problem: we need this to implement grabbing rank for UQ (not part of RMG 4 paper)

Right now extract_source_from_comments

def extract_source_from_comments(self, species):

only grabs the library name instead of the library entry object. This causes problems downstream in the uncertainty estimation tool because get_partial_uncertainty_value

def get_partial_uncertainty_value(self, source, corr_source_type, corr_param=None, corr_group_type=None):

only has access to what gets saved in the source, and it's a total pain extracting things like the species structure or rank, which could have been added in extract_source_from_comments and are added for Rate Rules, but never got implemented for Libraries.

This PR updates extract_source_from_comments to use the actual library entry objects, and then modifies the downstream code in rmgpy.tools.uncertainty to use that information.

Description of Changes (each bullet is a commit)

  • New uncertainty test to make sure we reference the correct library entries when using radical or adsorption correction
  • Refactor thermo's extract_source_from_comments to use helper functions (_parse_gav_groups is almost an exact copy of the last section of the old extract_source_from_comments) and also return specific library entry objects instead of just the library name. Update thermoTest to handle this change in library source format.
  • Update kinetics db's extract_source_from_comments to return specific library entry objects instead of just the library name. Update kineticsTest to handle the change in library source format.
  • Update the uncertainty tool to use specific library entry objects instead library names. This allows us to delete a lot of code, including the extra_species property, which I found especially confusing.

Testing

  • added a new uncertainty test to make sure the correct library entries are being correlated when one species uses a Library source and the other uses the same Library source + a radical correction.
  • this passes the thermo database and kinetics database tests
  • TODO: rerun previous uncertainty demo notebooks

Reviewer Tips

¯_(ツ)_/¯

@github-actions
Copy link
Copy Markdown

Regression Testing Results

⚠️ One or more regression tests failed.
Please download the failed results and run the tests locally or check the log to see why.

Detailed regression test results.

Regression test aromatics:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:52
Current: Execution time (DD:HH:MM:SS): 00:00:00:51
Reference: Memory used: 823.87 MB
Current: Memory used: 822.81 MB

aromatics Passed Core Comparison ✅

Original model has 15 species.
Test model has 15 species. ✅
Original model has 11 reactions.
Test model has 11 reactions. ✅

aromatics Failed Edge Comparison ❌

Original model has 106 species.
Test model has 106 species. ✅
Original model has 358 reactions.
Test model has 358 reactions. ✅

Non-identical thermo! ❌
original: [CH]1C2=CC3C1C=CC23
tested: [CH]1C2=CC3C1C=CC23

Hf(300K) S(300K) Cp(300K) Cp(400K) Cp(500K) Cp(600K) Cp(800K) Cp(1000K) Cp(1500K)
169.15 73.17 31.27 38.45 44.76 50.28 59.14 65.47 72.92
167.21 73.60 28.78 36.79 44.00 50.25 59.65 65.52 74.04

thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)CsHH) + group(Cds-CdsCsCs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + polycyclic(s2_4_5_diene_1_5) + polycyclic(s3_4_5_ene_3) + polycyclic(s3_5_5_ene_1) - ring(Cyclobutene) - ring(Cyclopentene) - ring(Cyclopentane) + radical(cyclopentene-allyl)
thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)CsHH) + group(Cds-CdsCsCs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + polycyclic(s2_4_5_diene_1_5) + polycyclic(s3_4_5_ene_3) + polycyclic(s2_5_5_diene_1_5) - ring(Cyclobutene) - ring(Cyclopentene) - ring(Cyclopentene) + radical(cyclopentene-allyl)

Non-identical thermo! ❌
original: [CH]1C2C=CC3C(=C2)C13
tested: [CH]1C2C=CC3C(=C2)C13

Hf(300K) S(300K) Cp(300K) Cp(400K) Cp(500K) Cp(600K) Cp(800K) Cp(1000K) Cp(1500K)
144.84 79.03 29.08 35.37 40.95 45.86 53.89 59.79 67.35
125.44 71.45 27.43 34.15 40.42 46.18 56.01 63.43 71.86

thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-CsCsHH) + group(Cds-CdsCsCs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + Estimated bicyclic component: polycyclic(s2_3_5_ane) - ring(Cyclopentane) - ring(Cyclopropane) + ring(Cyclopentene) + ring(Cyclopropane) + polycyclic(s2_3_6_diene_0_3) + Estimated bicyclic component: polycyclic(s3_5_6_ane) - ring(Cyclohexane) - ring(Cyclopentane) + ring(1,4-Cyclohexadiene) + ring(Cyclopentene) - ring(Cyclopropane) - ring(Cyclopentene) - ring(1,4-Cyclohexadiene) + radical(cyclopentene-4)
thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-CsCsHH) + group(Cds-CdsCsCs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + Estimated bicyclic component: polycyclic(s2_3_5_ane) - ring(Cyclopentane) - ring(Cyclopropane) + ring(Cyclopentene) + ring(Cyclopropane) + polycyclic(s2_3_6_ene_1) + polycyclic(s3_5_6_diene_1_5) - ring(Cyclopropane) - ring(Cyclopentene) - ring(Cyclohexene) + radical(cyclopentene-4)

Non-identical thermo! ❌
original: [CH]1C2=CC3C1C3C=C2
tested: [CH]1C2=CC3C1C3C=C2

Hf(300K) S(300K) Cp(300K) Cp(400K) Cp(500K) Cp(600K) Cp(800K) Cp(1000K) Cp(1500K)
98.15 66.21 25.82 33.30 40.19 46.24 55.47 61.34 70.49
100.48 61.70 25.50 33.41 40.70 47.02 56.22 61.78 71.32

thermo: Thermo group additivity estimation: group(Cs-CsCsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsHH) + group(Cds- Cds(Cds-Cds)Cs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-Cds(Cds-Cds)H) + polycyclic(s2_3_5_ene_1) + polycyclic(s2_3_6_diene_1_3) + Estimated bicyclic component: polycyclic(s3_5_6_ane) - ring(Cyclohexane) - ring(Cyclopentane) + ring(1,3-Cyclohexadiene) + ring(Cyclopentene) - ring(Cyclopropane) - ring(Cyclopentene) - ring(1,3-Cyclohexadiene) + radical(cyclopentene-allyl)
thermo: Thermo group additivity estimation: group(Cs-CsCsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsHH) + group(Cds- Cds(Cds-Cds)Cs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-Cds(Cds-Cds)H) + polycyclic(s2_3_5_ene_1) + polycyclic(s2_3_6_ene_1) + Estimated bicyclic component: polycyclic(s3_5_6_ane) - ring(Cyclohexane) - ring(Cyclopentane) + ring(Cyclohexene) + ring(Cyclopentene) - ring(Cyclopropane) - ring(Cyclopentene) - ring(Cyclohexene) + radical(cyclopentene-allyl)

Non-identical thermo! ❌
original: C=CC1C=CC2=CC1C=C2
tested: C=CC1C=CC2=CC1C=C2

Hf(300K) S(300K) Cp(300K) Cp(400K) Cp(500K) Cp(600K) Cp(800K) Cp(1000K) Cp(1500K)
83.22 82.78 35.48 45.14 53.78 61.40 73.58 82.20 95.08
83.22 84.16 35.48 45.14 53.78 61.40 73.58 82.20 95.08

Identical thermo comments:
thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cds-Cds(Cds-Cds)(Cds-Cds)) + group(Cds- CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-Cds(Cds-Cds)H) + group(Cds-Cds(Cds-Cds)H) + group(Cds-CdsHH) + Estimated bicyclic component: polycyclic(s3_5_6_ane) - ring(Cyclohexane) - ring(Cyclopentane) + ring(1,3-Cyclohexadiene) + ring(Cyclopentadiene)

Non-identical kinetics! ❌
original:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2=CC3C1C=CC23(62) origin: Intra_R_Add_Endocyclic
tested:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2=CC3C1C=CC23(62) origin: Intra_R_Add_Endocyclic

k(1bar) 300K 400K 500K 600K 800K 1000K 1500K 2000K
k(T): -47.51 -31.51 -21.94 -15.56 -7.62 -2.87 3.42 6.54
k(T): -46.27 -30.58 -21.19 -14.94 -7.15 -2.49 3.67 6.72

kinetics: Arrhenius(A=(1.08454e+19,'s^-1'), n=-0.859, Ea=(88.43,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone1_2R!H-inRing_1R!H-inRing in family Intra_R_Add_Endocyclic.""")
kinetics: Arrhenius(A=(1.08454e+19,'s^-1'), n=-0.859, Ea=(86.724,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone1_2R!H-inRing_1R!H-inRing in family Intra_R_Add_Endocyclic.""")
Identical kinetics comments:
kinetics: Estimated from node Backbone1_2R!H-inRing_1R!H-inRing in family Intra_R_Add_Endocyclic.

Non-identical kinetics! ❌
original:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2C=CC3C(=C2)C13(63) origin: Intra_R_Add_Endocyclic
tested:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2C=CC3C(=C2)C13(63) origin: Intra_R_Add_Endocyclic

k(1bar) 300K 400K 500K 600K 800K 1000K 1500K 2000K
k(T): -37.76 -25.37 -17.92 -12.96 -6.74 -3.01 1.98 4.49
k(T): -27.05 -17.33 -11.49 -7.60 -2.72 0.21 4.13 6.10

kinetics: Arrhenius(A=(1.12e+11,'s^-1'), n=0.26, Ea=(67.891,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.""")
kinetics: Arrhenius(A=(1.12e+11,'s^-1'), n=0.26, Ea=(53.177,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.""")
Identical kinetics comments:
kinetics: Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.

Non-identical kinetics! ❌
original:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2=CC3C1C3C=C2(67) origin: Intra_R_Add_Endocyclic
tested:
rxn: [CH]1C2=CC=CC1C=C2(48) <=> [CH]1C2=CC3C1C3C=C2(67) origin: Intra_R_Add_Endocyclic

k(1bar) 300K 400K 500K 600K 800K 1000K 1500K 2000K
k(T): -14.18 -7.68 -3.77 -1.16 2.10 4.07 6.70 8.03
k(T): -15.17 -8.42 -4.36 -1.66 1.73 3.77 6.50 7.88

kinetics: Arrhenius(A=(1.12e+11,'s^-1'), n=0.26, Ea=(35.513,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.""")
kinetics: Arrhenius(A=(1.12e+11,'s^-1'), n=0.26, Ea=(36.869,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.""")
Identical kinetics comments:
kinetics: Estimated from node Backbone3_Sp-4R!H=1R!H_Sp-3R!H-2R!H_Sp-2R!H-1R!H_Ext-2R!H-R in family Intra_R_Add_Endocyclic.

Non-identical kinetics! ❌
original:
rxn: C1=CC2C=C[C]1C=C2(49) <=> [CH]1C2=CC3C1C3C=C2(67) origin: Intra_R_Add_Endocyclic
tested:
rxn: C1=CC2C=C[C]1C=C2(49) <=> [CH]1C2=CC3C1C3C=C2(67) origin: Intra_R_Add_Endocyclic

k(1bar) 300K 400K 500K 600K 800K 1000K 1500K 2000K
k(T): -8.00 -2.50 0.81 3.02 5.79 7.46 9.70 10.83
k(T): -8.89 -3.16 0.28 2.58 5.46 7.19 9.52 10.69

kinetics: Arrhenius(A=(1.49409e+13,'s^-1'), n=0.283, Ea=(30.033,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone2_Sp-3R!H=1R!H_N-4R!H->S_2R!H-inRing_5R!H-inRing_Ext-5R!H-R_Ext-6R!H-R_Ext-7R!H-R_1R!H-inRing in family Intra_R_Add_Endocyclic. Multiplied by reaction path degeneracy 3.0""")
kinetics: Arrhenius(A=(1.49409e+13,'s^-1'), n=0.283, Ea=(31.249,'kcal/mol'), T0=(1,'K'), comment="""Estimated from node Backbone2_Sp-3R!H=1R!H_N-4R!H->S_2R!H-inRing_5R!H-inRing_Ext-5R!H-R_Ext-6R!H-R_Ext-7R!H-R_1R!H-inRing in family Intra_R_Add_Endocyclic. Multiplied by reaction path degeneracy 3.0""")
Identical kinetics comments:
kinetics: Estimated from node Backbone2_Sp-3R!H=1R!H_N-4R!H->S_2R!H-inRing_5R!H-inRing_Ext-5R!H-R_Ext-6R!H-R_Ext-7R!H-R_1R!H-inRing in family Intra_R_Add_Endocyclic.
Multiplied by reaction path degeneracy 3.0

Errors occurred during edge comparison ⚠️ ERROR conda.cli.main_run:execute(148): `conda run python scripts/checkModels.py aromatics-edge stable_regression_results/aromatics/chemkin/chem_edge_annotated.inp stable_regression_results/aromatics/chemkin/species_edge_dictionary.txt test/regression/aromatics/chemkin/chem_edge_annotated.inp test/regression/aromatics/chemkin/species_edge_dictionary.txt` failed. (See above for error)
Details Observables Test Case: Aromatics Comparison

✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions!

aromatics Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/aromatics/regression_input.py"... INFO:root:options( title = 'Aromatics', tolerance = 0.5, )

observables

observable(
label = 'benzene',
structure=SMILES('c1ccccc1'),
)

species definition used in the reactor setup specification

species(
label = 'benzene',
structure=SMILES('c1ccccc1'),
)

species(
label = 'ethyne',
structure=SMILES('C#C'),
)

reactor setups

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([100],'s'),
initialMoleFractionsList=[{
"benzene": 0.2,
"ethyne": 0.8,
}],
temperatures=([1500.0],'K'),
pressures=([1.0],'bar'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0

Regression test liquid_oxidation:

Reference: Execution time (DD:HH:MM:SS): 00:00:01:53
Current: Execution time (DD:HH:MM:SS): 00:00:01:50
Reference: Memory used: 907.79 MB
Current: Memory used: 906.56 MB

liquid_oxidation Passed Core Comparison ✅

Original model has 37 species.
Test model has 37 species. ✅
Original model has 239 reactions.
Test model has 239 reactions. ✅

liquid_oxidation Failed Edge Comparison ❌

Original model has 214 species.
Test model has 214 species. ✅
Original model has 1588 reactions.
Test model has 1588 reactions. ✅
The original model has 2 reactions that the tested model does not have. ❌
rxn: CC(C[CH]COO)OO(118) <=> CC(CC[CH]OO)OO(133) origin: intra_H_migration
rxn: CC(C[CH]COO)OO(118) <=> C[C](CCCOO)OO(132) origin: intra_H_migration
The tested model has 2 reactions that the original model does not have. ❌
rxn: CC(C[CH]COO)OO(115) <=> [OH](22) + CC(CCC=O)OO(116) origin: intra_H_migration
rxn: CC(C[CH]COO)OO(115) <=> [OH](22) + CC(=O)CCCOO(112) origin: intra_H_migration

Errors occurred during edge comparison ⚠️ ERROR conda.cli.main_run:execute(148): `conda run python scripts/checkModels.py liquid_oxidation-edge stable_regression_results/liquid_oxidation/chemkin/chem_edge_annotated.inp stable_regression_results/liquid_oxidation/chemkin/species_edge_dictionary.txt test/regression/liquid_oxidation/chemkin/chem_edge_annotated.inp test/regression/liquid_oxidation/chemkin/species_edge_dictionary.txt` failed. (See above for error)
Details Observables Test Case: liquid_oxidation Comparison

✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions!

liquid_oxidation Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/liquid_oxidation/regression_input.py"... INFO:root:options( title='liquid_oxidation', tolerance=0.1 )

observable(
label='pentane',
structure=SMILES('CCCCC')
)

species(
label='oxygen',
structure=SMILES('[O][O]'),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([1e3], 's'),
initialMoleFractionsList=[{
'pentane': 0.9,
'oxygen': 0.1,
}],
temperatures=([600], 'K'),
pressures=([1.0], 'bar'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0

Regression test nitrogen:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:56
Current: Execution time (DD:HH:MM:SS): 00:00:00:55
Reference: Memory used: 907.83 MB
Current: Memory used: 910.81 MB

nitrogen Passed Core Comparison ✅

Original model has 41 species.
Test model has 41 species. ✅
Original model has 360 reactions.
Test model has 360 reactions. ✅

nitrogen Passed Edge Comparison ✅

Original model has 133 species.
Test model has 133 species. ✅
Original model has 983 reactions.
Test model has 983 reactions. ✅

Details Observables Test Case: NC Comparison

✅ All Observables varied by less than 0.200 on average between old model and new model in all conditions!

nitrogen Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/nitrogen/regression_input.py"... INFO:root: options( title='NC', tolerance=0.2 )

observable(
label='NC',
structure=SMILES("NC"),
)

observable(
label='OH',
structure=SMILES("[OH]"),
)

species(
label='O2',
structure=SMILES("[O][O]"),
)

species(
label='Ar',
structure=adjacencyList('1 Ar u0 p4 c0'),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([0.002],'s'),
initialMoleFractionsList=[{
"NC": 0.0005,
"O2": 0.002,
"Ar": 0.9975,
}],
temperatures=([1500],'K'),
pressures=([1.],'atm'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0

Regression test oxidation:

Reference: Execution time (DD:HH:MM:SS): 00:00:01:31
Current: Execution time (DD:HH:MM:SS): 00:00:01:32
Reference: Memory used: 792.61 MB
Current: Memory used: 791.79 MB

oxidation Passed Core Comparison ✅

Original model has 59 species.
Test model has 59 species. ✅
Original model has 694 reactions.
Test model has 694 reactions. ✅

oxidation Passed Edge Comparison ✅

Original model has 230 species.
Test model has 230 species. ✅
Original model has 1524 reactions.
Test model has 1524 reactions. ✅

Details Observables Test Case: Oxidation Comparison

✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions!

oxidation Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/oxidation/regression_input.py"... INFO:root:options( title = 'Oxidation', tolerance = 0.5, )

observables

observable(
label = 'OH',
structure=SMILES('[OH]'),
)

species definition used in the reactor setup specification

species(
label = 'OH',
structure=SMILES('[OH]'),
)

species(
label = 'N2',
structure=SMILES("N#N"),
)

species(
label = 'O2',
structure=SMILES('[O][O]'),
)

species(
label = 'propane',
structure=SMILES('CCC'),
)

reactor setups

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([100.0],'s'),
initialMoleFractionsList=[{
"propane": 2.0/7.0,
"O2": 1.0,
"N2":4.0,
}],
temperatures=([725.0],'K'),
pressures=([10.0],'bar'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
WARNING:root:Initial mole fractions do not sum to one; normalizing.
INFO:root:
INFO:root:Original composition:
INFO:root:propane = 0.2857142857142857
INFO:root:O2 = 1.0
INFO:root:N2 = 4.0
INFO:root:
INFO:root:Normalized mole fractions:
INFO:root:propane = 0.05405405405405405
INFO:root:O2 = 0.1891891891891892
INFO:root:N2 = 0.7567567567567568
INFO:root:

Regression test sulfur:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:37
Current: Execution time (DD:HH:MM:SS): 00:00:00:36
Reference: Memory used: 905.16 MB
Current: Memory used: 903.78 MB

sulfur Passed Core Comparison ✅

Original model has 27 species.
Test model has 27 species. ✅
Original model has 74 reactions.
Test model has 74 reactions. ✅

sulfur Failed Edge Comparison ❌

Original model has 89 species.
Test model has 89 species. ✅
Original model has 227 reactions.
Test model has 227 reactions. ✅
The original model has 1 reactions that the tested model does not have. ❌
rxn: O(4) + SO2(15) (+N2) <=> SO3(16) (+N2) origin: primarySulfurLibrary
The tested model has 1 reactions that the original model does not have. ❌
rxn: O(4) + SO2(15) (+N2) <=> SO3(16) (+N2) origin: primarySulfurLibrary

Errors occurred during edge comparison ⚠️ ERROR conda.cli.main_run:execute(148): `conda run python scripts/checkModels.py sulfur-edge stable_regression_results/sulfur/chemkin/chem_edge_annotated.inp stable_regression_results/sulfur/chemkin/species_edge_dictionary.txt test/regression/sulfur/chemkin/chem_edge_annotated.inp test/regression/sulfur/chemkin/species_edge_dictionary.txt` failed. (See above for error)
Details Observables Test Case: SO2 Comparison

The following observables did not match:

❌ Observable species O=S=O varied by more than 0.100 on average between old model SO2(15) and new model SO2(15) in condition 1.

⚠️ The following reaction conditions had some discrepancies:
Condition 1:
Reactor Type: IdealGasReactor
Reaction Time: 0.01 s
T0: 900 K
P0: 30 bar
Initial Mole Fractions: {'S': 0.000756, '[O][O]': 0.00129, 'N#N': 0.997954}

sulfur Failed Observable Testing ❌
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/sulfur/regression_input.py"... INFO:root: options( title='SO2', tolerance=0.1 )

observable(
label='SO2',
structure=SMILES("O=S=O"),
)
species(
label='H2S',
structure=SMILES("S"),
)

species(
label='O2',
structure=SMILES("[O][O]"),
)

species(
label='N2',
structure=SMILES("N#N"),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([0.01],'s'),
initialMoleFractionsList=[{
"H2S": 0.000756,
"O2": 0.001290,
"N2": 0.997954}],
temperatures=([900],'K'),
pressures=([30.],'bar'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
ERROR conda.cli.main_run:execute(148): conda run python rmgpy/tools/regression.py test/regression/sulfur/regression_input.py stable_regression_results/sulfur/chemkin test/regression/sulfur/chemkin failed. (See above for error)

Regression test superminimal:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:23
Current: Execution time (DD:HH:MM:SS): 00:00:00:21
Reference: Memory used: 967.06 MB
Current: Memory used: 971.46 MB

superminimal Passed Core Comparison ✅

Original model has 13 species.
Test model has 13 species. ✅
Original model has 21 reactions.
Test model has 21 reactions. ✅

superminimal Passed Edge Comparison ✅

Original model has 18 species.
Test model has 18 species. ✅
Original model has 28 reactions.
Test model has 28 reactions. ✅

Regression test RMS_constantVIdealGasReactor_superminimal:

Reference: Execution time (DD:HH:MM:SS): 00:00:02:17
Current: Execution time (DD:HH:MM:SS): 00:00:02:37
Reference: Memory used: 2304.96 MB
Current: Memory used: 2511.59 MB

RMS_constantVIdealGasReactor_superminimal Passed Core Comparison ✅

Original model has 13 species.
Test model has 13 species. ✅
Original model has 19 reactions.
Test model has 19 reactions. ✅

RMS_constantVIdealGasReactor_superminimal Passed Edge Comparison ✅

Original model has 13 species.
Test model has 13 species. ✅
Original model has 19 reactions.
Test model has 19 reactions. ✅

Details Observables Test Case: RMS_constantVIdealGasReactor_superminimal Comparison

✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions!

RMS_constantVIdealGasReactor_superminimal Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/RMS_constantVIdealGasReactor_superminimal/regression_input.py"... INFO:root: options( title='RMS_constantVIdealGasReactor_superminimal', tolerance=0.1 )

observable(
label='H2',
structure=SMILES("[H][H]"),
)

observable(
label='O2',
structure=SMILES("[O][O]"),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([0.01],'s'),
initialMoleFractionsList=[{
'H2':.67,
'O2':.33,
}],
temperatures=([1000],'K'),
pressures=([1.0],'bar'),
)
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0

Regression test RMS_CSTR_liquid_oxidation:

Reference: Execution time (DD:HH:MM:SS): 00:00:24:55
Current: Execution time (DD:HH:MM:SS): 00:00:18:33
Reference: Memory used: 3526.41 MB
Current: Memory used: 3661.74 MB

RMS_CSTR_liquid_oxidation Failed Core Comparison ❌

Original model has 35 species.
Test model has 35 species. ✅
Original model has 134 reactions.
Test model has 132 reactions. ❌
The original model has 1 species that the tested model does not have. ❌
spc: CC1CC(C)O1(87)
The tested model has 1 species that the original model does not have. ❌
spc: CCH2
The original model has 3 reactions that the tested model does not have. ❌
rxn: CCC(CC)O[O](20) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction
rxn: [CH2]CC(CC)OO(32) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction
rxn: C[CH]CC(C)OO(37) <=> [OH](26) + CC1CC(C)O1(87) origin: Cyclic_Ether_Formation
The tested model has 1 reactions that the original model does not have. ❌
rxn: C[CH2](6) + [CH2]CC(5) <=> pentane(2) origin: R_Recombination

Errors occurred during core comparison ⚠️ ERROR conda.cli.main_run:execute(148): `conda run python scripts/checkModels.py RMS_CSTR_liquid_oxidation-core stable_regression_results/RMS_CSTR_liquid_oxidation/chemkin/chem_annotated.inp stable_regression_results/RMS_CSTR_liquid_oxidation/chemkin/species_dictionary.txt test/regression/RMS_CSTR_liquid_oxidation/chemkin/chem_annotated.inp test/regression/RMS_CSTR_liquid_oxidation/chemkin/species_dictionary.txt` failed. (See above for error)
RMS_CSTR_liquid_oxidation Failed Edge Comparison ❌

Original model has 100 species.
Test model has 99 species. ❌
Original model has 385 reactions.
Test model has 380 reactions. ❌
The original model has 1 species that the tested model does not have. ❌
spc: CCCCCOOOO
The original model has 5 reactions that the tested model does not have. ❌
rxn: CCC(CC)O[O](20) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction
rxn: [CH2]CC(CC)OO(32) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction
rxn: oxygen(1) + CCCCCO[O](61) <=> CCCCCOOO[O](77) origin: R_Recombination
rxn: CC[C](CC)OO(52) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction
rxn: C[CH]C(CC)OO(31) + CCCCCOO(78) <=> CCCCCO[O](61) + CCC(CC)OO(24) origin: H_Abstraction

Errors occurred during edge comparison ⚠️ ERROR conda.cli.main_run:execute(148): `conda run python scripts/checkModels.py RMS_CSTR_liquid_oxidation-edge stable_regression_results/RMS_CSTR_liquid_oxidation/chemkin/chem_edge_annotated.inp stable_regression_results/RMS_CSTR_liquid_oxidation/chemkin/species_edge_dictionary.txt test/regression/RMS_CSTR_liquid_oxidation/chemkin/chem_edge_annotated.inp test/regression/RMS_CSTR_liquid_oxidation/chemkin/species_edge_dictionary.txt` failed. (See above for error)
Details Observables Test Case: RMS_CSTR_liquid_oxidation Comparison

✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions!

RMS_CSTR_liquid_oxidation Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/RMS_CSTR_liquid_oxidation/regression_input.py"... INFO:root:options( title='RMS_CSTR_liquid_oxidation', tolerance=0.1 )

observable(
label='pentane',
structure=SMILES('CCCCC')
)

species(
label='oxygen',
structure=SMILES('[O][O]'),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([1e3], 's'),
initialMoleFractionsList=[{
'pentane': 0.9,
'oxygen': 0.1,
}],
temperatures=([600], 'K'),
pressures=([1.0], 'bar'),
)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0

Regression test fragment:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:31
Current: Execution time (DD:HH:MM:SS): 00:00:00:30
Reference: Memory used: 753.75 MB
Current: Memory used: 752.32 MB

fragment Passed Core Comparison ✅

Original model has 10 species.
Test model has 10 species. ✅
Original model has 2 reactions.
Test model has 2 reactions. ✅

fragment Passed Edge Comparison ✅

Original model has 33 species.
Test model has 33 species. ✅
Original model has 47 reactions.
Test model has 47 reactions. ✅

Details Observables Test Case: fragment Comparison

✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions!

fragment Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/fragment/regression_input.py"... INFO:root: options( title='fragment', tolerance=0.1 )

observable(
label="LCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 L u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

species(
label="LCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 L u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

species(
label="RCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 R u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([0.01],'s'),
initialMoleFractionsList=[{
"LCCCC": 1,
"RCCCC": 1,
}],
temperatures=([1600],'K'),
pressures=([40.0],'bar'),
)
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
WARNING:root:Initial mole fractions do not sum to one; normalizing.
INFO:root:
INFO:root:Original composition:
INFO:root:LCCCC = 1
INFO:root:RCCCC = 1
INFO:root:
INFO:root:Normalized mole fractions:
INFO:root:LCCCC = 0.5
INFO:root:RCCCC = 0.5
INFO:root:

Regression test RMS_constantVIdealGasReactor_fragment:

Reference: Execution time (DD:HH:MM:SS): 00:00:02:43
Current: Execution time (DD:HH:MM:SS): 00:00:03:00
Reference: Memory used: 2425.29 MB
Current: Memory used: 2579.28 MB

RMS_constantVIdealGasReactor_fragment Passed Core Comparison ✅

Original model has 10 species.
Test model has 10 species. ✅
Original model has 2 reactions.
Test model has 2 reactions. ✅

RMS_constantVIdealGasReactor_fragment Passed Edge Comparison ✅

Original model has 27 species.
Test model has 27 species. ✅
Original model has 24 reactions.
Test model has 24 reactions. ✅

Details Observables Test Case: RMS_constantVIdealGasReactor_fragment Comparison

✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions!

RMS_constantVIdealGasReactor_fragment Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/RMS_constantVIdealGasReactor_fragment/regression_input.py"... INFO:root: options( title='RMS_constantVIdealGasReactor_fragment', tolerance=0.1 )

observable(
label="LCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 L u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

species(
label="LCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 L u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

species(
label="RCCCC",
structure=fragment_adj(
"""1 C u0 p0 c0 {2,S} {3,S} {5,S} {6,S}
2 C u0 p0 c0 {1,S} {4,S} {7,S} {8,S}
3 C u0 p0 c0 {1,S} {9,S} {10,S} {11,S}
4 C u0 p0 c0 {2,S} {12,S} {13,S} {14,S}
5 H u0 p0 c0 {1,S}
6 H u0 p0 c0 {1,S}
7 H u0 p0 c0 {2,S}
8 H u0 p0 c0 {2,S}
9 R u0 p0 c0 {3,S}
10 H u0 p0 c0 {3,S}
11 H u0 p0 c0 {3,S}
12 H u0 p0 c0 {4,S}
13 H u0 p0 c0 {4,S}
14 H u0 p0 c0 {4,S}
"""
),
)

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([0.01],'s'),
initialMoleFractionsList=[{
"LCCCC": 1,
"RCCCC": 1,
}],
temperatures=([1600],'K'),
pressures=([40.0],'bar'),
)
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
WARNING:root:Initial mole fractions do not sum to one; normalizing.
INFO:root:
INFO:root:Original composition:
INFO:root:LCCCC = 1
INFO:root:RCCCC = 1
INFO:root:
INFO:root:Normalized mole fractions:
INFO:root:LCCCC = 0.5
INFO:root:RCCCC = 0.5
INFO:root:

Regression test minimal_surface:

Reference: Execution time (DD:HH:MM:SS): 00:00:00:30
Current: Execution time (DD:HH:MM:SS): 00:00:00:29
Reference: Memory used: 910.72 MB
Current: Memory used: 910.70 MB

minimal_surface Passed Core Comparison ✅

Original model has 11 species.
Test model has 11 species. ✅
Original model has 3 reactions.
Test model has 3 reactions. ✅

minimal_surface Passed Edge Comparison ✅

Original model has 38 species.
Test model has 38 species. ✅
Original model has 38 reactions.
Test model has 38 reactions. ✅

Details Observables Test Case: minimal_surface Comparison

✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions!

minimal_surface Passed Observable Testing ✅
Errors occurred during observable testing ⚠️ INFO:root:Reading input file "/home/runner/work/RMG-Py/RMG-Py/test/regression/minimal_surface/regression_input.py"... INFO:root:options( title = 'minimal_surface', tolerance = 0.5, )

observables

observable(
label = 'CH4',
structure=SMILES('C'),
)

observable(
label = 'O2',
structure=SMILES('[O][O]'),
)

observable(
label = 'X',
structure=adjacencyList(
"""
1 X u0 p0 c0
"""),
)

List of species

species(
label='CH4',
structure=SMILES("[CH4]"),
)
species(
label='O2',
structure=adjacencyList(
"""
1 O u1 p2 c0 {2,S}
2 O u1 p2 c0 {1,S}
"""),
)
species(
label='N2',
structure=SMILES("N#N"),
)
species(
label='X',
structure=adjacencyList(
"""
1 X u0 p0 c0
"""),
)

reactor setups

reactorSetups(
reactorTypes=['IdealGasReactor'],
terminationTimes=([1.0], 's'),
initialMoleFractionsList=[{
'CH4': 0.15,
'O2': 0.15,
'N2': 0.7,
}],
initialSurfaceMoleFractionsList=[{
'X': 1.0,
}],

temperatures=([1000.0], 'K'),
pressures=([1.0], 'bar'),

)

INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
INFO:root:Thermo file has default temperature range 300.0 to 1000.0 and 1000.0 to 5000.0
/home/runner/work/RMG-Py/RMG-Py/rmgpy/tools/canteramodel.py:550: UserWarning: ReactorSurface::syncState: Behavior changed in Cantera 3.2 for consistency with ReactorBase. To set SurfPhase state from ReactorSurface object, use restoreState().
species_data.append(np.concatenate((cantera_reactor.thermo[species_names_list].X, rsurf.kinetics.coverages)))

beep boop this comment was written by a bot 🤖

@sevyharris sevyharris force-pushed the expand_lib_extract_source branch 7 times, most recently from daa9af4 to a167215 Compare May 28, 2026 20:22
@sevyharris sevyharris marked this pull request as ready for review May 28, 2026 20:22
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch from a167215 to b9eeaf0 Compare May 28, 2026 20:30
@sevyharris sevyharris requested a review from Copilot May 28, 2026 20:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

rmgpy/tools/uncertainty.py:78

  • get_uncertainty_value() constructs the covariance lookup label as f'Surface_Library {source["Surface_Library"][2]}', but source['Surface_Library'][2] is already intended to be the full parameter label (e.g., Surface_Library CH4(16)), so this will duplicate the prefix and fail to match keys in other_covariances. Use the stored label directly (and ensure extract_sources_from_model() stores it in the same format used when building covariance labels).
            varG += self.dG_library * self.dG_library
        if 'Surface_Library' in source:
            surf_lib_varG = self.dG_surf_lib * self.dG_surf_lib
            # covariance libraries should overrule the default uncertainties when available,
            if self.other_covariances is not None:
                label = f'Surface_Library {source["Surface_Library"][2]}'  # match the covariance dict label format
                cov_label = (label, label)
                if cov_label in self.other_covariances:
                    surf_lib_varG = self.other_covariances[cov_label]
            varG += surf_lib_varG  # Add the variance of the surface library parameter if covariance is not specified in the covariance libraries

Comment thread rmgpy/tools/uncertainty.py
Comment thread rmgpy/tools/uncertainty.py Outdated
Comment thread rmgpy/data/thermo.py
Comment thread rmgpy/data/thermo.py
Comment thread rmgpy/data/kinetics/database.py
Comment thread test/rmgpy/tools/uncertaintyTest.py
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch 6 times, most recently from a0dfbfd to 6b61784 Compare May 28, 2026 21:58
@sevyharris sevyharris requested a review from Copilot May 28, 2026 22:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Comment thread rmgpy/data/thermo.py Outdated
Comment thread rmgpy/data/thermo.py
Comment thread rmgpy/data/kinetics/database.py
Comment thread rmgpy/data/kinetics/database.py
Comment thread rmgpy/tools/uncertainty.py
Add some tests to make sure the correct index is referenced when assembling thermo sources that use libraries. For example, if CH3 is estimated from a CH4 library + a radical correction, we want to make sure the uncertainty source points to CH4 as the index for the library value used (as opposed to CH3)
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch from 6b61784 to e384ea8 Compare May 29, 2026 14:08
This refactors the extract_source_from_comments function and changes library sources so that a tuple of the library name and the library entry object is returned instead of just the library name. It also returns a tuple of QM method and molecule used for the case of QM sources.
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch from e384ea8 to 41ada7e Compare May 29, 2026 14:13
Before this, the kinetics version of extract_source_from_comment returned the library name, but now it returns a tuple of the library name and the library entry. This makes things much easier downstream in the uncertainty tool.
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch from 41ada7e to 438222f Compare May 29, 2026 14:18
When the library sources only included the name of the library, the uncertainty code had to compensate by adding extra species that are not in the model. Now that we're using library entry objects we are able to remove the complexity of the uncertainty.extra_species object.
@sevyharris sevyharris force-pushed the expand_lib_extract_source branch from 438222f to aedb962 Compare May 29, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants