Repository used to investigate bugs for rebasing my PFAS/CH2F2 RMG-database.
This repository uses Jupytext pairing at the repository level (.jupytext.toml) with:
ipynbpy:percent
So each notebook can have a paired .py text representation.
From repo root:
make check— list pairing status for all notebooks (PAIRED/UNPAIRED) and print a summary.make py— create paired.pyfiles for notebooks that do not yet have one.make sync— sync all paired notebooks and scripts in both directions.make run— execute all notebooks in place usingjupyter nbconvert --execute.
All targets scan all folders and skip hidden/checkpoint directories (e.g., .ipynb_checkpoints, .git, and other .* dirs).
- Before editing notebooks: run
make check. - If any notebooks are unpaired: run
make pyonce. - After notebook/script edits: run
make syncto ensure.ipynband.pymatch. - Optionally validate execution: run
make run. - Commit both notebook and paired script changes together in the same commit.
Suggested quick sequence:
make check
make py
make sync
git statusI am very near finalizing all of the kinetic data additions to my PFAS/CH2F2 RMG database.
I have been validating my RMG database additions by generating multiple models for various single-halocarbon models and testing the flamespeed against experimental data. On my own outdated development branch for RMG-database (branching off of DF's "halogens_combustion_rebase" branch), I had committed all of my database changes and generated good models using these changes.
Great, now that I finished my changes on my outdated RMG database branch, my next step was to rebase my changes on to my updated "main" database, and then merge into the official RMG database. However, when I place all of my changes onto the new main branch (mostly new kinetic training data from Brown) and retrain on the updated branch, I find that the new CH3F (fluoromethane) model that I build on this updated branch yields flamespeeds that are nearly ~30 cm/s higher than expected. Something is wrong and needs to be fixed before I can merge my changes in...
To play around with things, you have to be on very specific branches and commits:
If you need it, the true home for my good model is in /work/westgroup/nora/Code/projects/westgroup/nora/Code/projects/halogens/refrigerants/halogens_paper/changing_RMG_Py/on_USNCM_blends/singles/CH3F. I will be copying it into this repository too.
When I generated the model, I used the following:
- RMG-database branch: commit 2d5ae5a4fe49390214d156d40839a5895aeccd48, from Thu Dec 12 12:50:51 2024, on USNCM_blends branch. This commit marked the finalized retraining for the kinetic families on this outdated development branch. This commit was DROPPED, since it yielded a few nodes in some kinetic families where the BM fit was bogus (see issue https://github.com/comocheng/wiki/issues/819#issuecomment-2549444309). We then moved on and tried retraining with certain commits from the most updated RMG-Py cherry-picked onto the outdated branch (i.e. the introduction of the average_kinetics_function for BM fitting, etc.).
- So that other people could access this, I reapplied this dropped commit (now edc0f17edb3c05354313c8e6e2e8d5c44ad85ddc) on https://github.com/Nora-Khalil/RMG-database/commits/reinstating_dropped_commit_for_good_CH3F_model/.
- RMG-Py: 4def2a47fb6207f3fda59e56ba8cfaab7404e906, from Tue Aug 13 15:19:22 2024, on https://github.com/Nora-Khalil/RMG-Py/commits/halogens_combustion_rebase/.
-
"Cherry-picked Average_Kinetics_Function" - this was the first model I generated where I realized something went wrong. Not truly a rebased model, only built using an RMG-Py that had some commits from main cherry-picked in (and a RMG-database with retraining to use the new cherry-picks). It was built using:
- RMG-Py: afdab8666f3d2dc94290590b0866d26db72c536d, commit from Tue Feb 4 12:05:23 2025, on my https://github.com/Nora-Khalil/RMG-Py/commits/average_kinetics_fix branch. This branch is very similar to the outdated halogens_combustion_branch that I used to build the good model, it just has some cherry-picked commits from RMG-Py main that modified the BM fitting (averages kinetics instead of fitting to BM if A>e30, abs(n)>5, and Eo<0 at the node.).
- RMG-database: aca03f207fedcc63aeea52030ebcbbbdd5002625 on USNCM_blends, https://github.com/Nora-Khalil/RMG-database/commits/USNCM_blends. This includes a new retraining with the RMG-Py from the above bullet, so now some nodes in families were averaged.
-
"Rebased Model" - yields bad flame speed, true home is /projects/westgroup/nora/Code/projects/halogens/refrigerants/halogens_paper/models_diff/CH3F_before_and_after_rebase/rebased_RMG-Py-database/regenerating_model_at_different_commits/all_families_on_rebase_edited_by_Nora/MODEL_with_newCH2F2_PFAS_libs/all_intended_families_included_PFAS_fams/.
- Used RMG-Py: 68b2eeeaa489dd2cf4b4bc1c8cf8b1e6a416d179, https://github.com/Nora-Khalil/RMG-Py/commits/halogens_combustion_rebase_Feb2025.
- Made with an RMG-database that wasn't commited, since it was autogenerated with the regenerating_models_at_different_commits.ipynb. You can recreate this database by running the cell in this ipynb called "Recreate Bad Model Database."
I have a script in this repo (regenerating_models_at_different_commits.ipynb) that starts with an RMG database branch that is up to date with main (as of Jan 25, 2025) and additionally only has two commits of my PFAS/CH2F2 database changes (some thermo and kinetic libraries). Starting with this branch, this script can then checkout out kinetic families from other commits of different branches (my outdated database that gave me the good model and the rebased database that gives me the bad model). I use this script to test which families are causing issues.
I have a second script that automates the testing of the flame speed. Goal flamespeed at the volume fraction of interest is ~30 cm/s. On RMG-database main, without any of my edits, its about ~16 cm/s.