Skip to content

Commit

Permalink
Merge branch 'main' into joback_sign_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwzheng authored Jun 11, 2024
2 parents 7cde5aa + 86351e7 commit 7d83dec
Show file tree
Hide file tree
Showing 80 changed files with 12,309 additions and 5,039 deletions.
12 changes: 0 additions & 12 deletions .conda/bld.bat

This file was deleted.

1 change: 1 addition & 0 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source:
path: ../

build:
noarch: generic
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}

requirements:
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

# configures the mamba environment manager and builds the environment
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: RMG-Py/environment.yml
miniforge-variant: Mambaforge
Expand Down Expand Up @@ -149,23 +149,24 @@ jobs:
run: mkdir stable_regression_results

# Retrieve Stable Results for reference
# Will need to use this -> https://github.com/dawidd6/action-download-artifact
- name : Find ID of Reference Results
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 1 --json databaseId --jq '.[0].databaseId')
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV
- name: Retrieve Stable Regression Results
if: ${{ env.REFERENCE_JOB == 'false' }}
uses: dsnopek/action-download-artifact@91dda23aa09c68860977dd0ed11d93c0ed3795e7 # see https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2459#issuecomment-1582850815
uses: actions/download-artifact@v4
with:
# this will search for the last successful execution of CI on main and download
# the stable regression results
workflow: CI.yml
workflow_conclusion: success
repo: ReactionMechanismGenerator/RMG-Py
branch: main
run-id: ${{ env.CI_RUN_ID }}
repository: ReactionMechanismGenerator/RMG-Py
github-token: ${{ secrets.GH_PAT }}
name: stable_regression_results
path: RMG-Py/stable_regression_results
search_artifacts: true # retrieves the last run result, either scheduled daily or on push to main
ensure_latest: true # ensures that the latest run is retrieved
# should result in a set of folders inside stable_regression_results
# each of which has the stable result for that example/test
path: stable_regression_results

# Regression Testing - Actual Comparisons
- name: Regression Tests - Compare to Baseline
Expand Down
53 changes: 20 additions & 33 deletions .github/workflows/conda_build.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,36 @@
name: Conda Build

on:
pull_request:
push:
branches:
- stable
jobs:
build-linux:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- name: Conda info
- uses: actions/checkout@v4
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: false
conda-solver: libmamba
auto-activate-base: true
activate-environment: ""
- name: Install Build Tools
run: conda install python anaconda-client conda-build
- name: Configure Auto-Upload
if: github.ref == 'refs/heads/stable'
run: |
conda info
conda list
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
conda build --token $CONDA_TOKEN --user rmg .conda
build-osx:
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- name: Conda info
run: |
conda info
conda list
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
conda build --token $CONDA_TOKEN --user rmg .conda
# set a default value to the conda_token if needed (like from forks)
: "${CONDA_TOKEN:=${{ secrets.ANACONDA_TOKEN }}}"
: "${CONDA_TOKEN:=default_value}"
echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV
conda config --add channels conda-forge
conda-build --token $CONDA_TOKEN --user rmg .conda
Binary file added families/images/Diels_alder_addition_Aromatic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added families/images/Surface_Abstraction_Beta_vdW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added families/images/Surface_Association_Beta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified families/images/Surface_Bidentate_Dissociation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added families/images/Surface_Dissociation_Beta_vdW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added families/images/Surface_Dissociation_Double.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added families/images/Surface_vdW_to_Bidentate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified families/rmg_reaction_families.pdf
Binary file not shown.
142 changes: 142 additions & 0 deletions input/kinetics/families/Surface_Abstraction_Beta_vdW/groups.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#!/usr/bin/env python
# encoding: utf-8

name = "Surface_Abstraction_Beta_vdW/groups"
shortDesc = u""
longDesc = u"""
Surface abstraction of one atom to another adsorbate. The bond fission occurs not at the binding atom, but in the beta position of the adsorbate, that is the bond between Atom *2 and *3 is broken. Atom *1 binds to the surface (*5). A vdW species is formed. The bond order between *4 and the surface decreases. An example for this reaction is: COOH* + O* = OH* + CO2*. The bond between *2 and *3 must be single.
*1-*2--*3 *4 *1=*2 *3-*4
| || ----> : |
~*5~ + ~*6~~ ~*5~ + ~*6~~
The rate, which should be in mol/m2/s, will be given by k * (mol/m2) * (mol/m2)
so k should be in (m2/mol/s).
"""

template(reactants=["Abstracting", "Donating"], products=["Adsorbate2","Adsorbate3"], ownReverse=False)

reverse = "Surface_Abstraction_reverse_Beta_vdW"

reactantNum=2
productNum=2

recipe(actions=[
['FORM_BOND', '*3', 1, '*4'],
['BREAK_BOND', '*1', 1, '*5'],
['FORM_BOND', '*1', 0, '*5'],
['CHANGE_BOND', '*1', 1, '*2'],
['BREAK_BOND', '*2', 1, '*3'],
['CHANGE_BOND', '*4',-1,'*6']
])

entry(
index = 1,
label = "Donating",
group =
"""
1 *1 R!H u0 px cx {2,S} {4,S}
2 *2 R!H u0 px cx {1,S} {3,S}
3 *3 R u0 {2,S}
4 *5 Xo u0 {1,S}
""",
kinetics = None,
)

entry(
index = 2,
label="Abstracting",
group =
"""
1 *6 Xo u0 {2,D}
2 *4 R!H u0 px cx {1,D}
""",
kinetics = None,
)

entry(
index = 3,
label = "R-C-H",
group =
"""
1 *1 R!H u0 px cx {2,S} {4,S}
2 *2 C u0 px cx {1,S} {3,S}
3 *3 H u0 {2,S}
4 *5 Xo u0 {1,S}
""",
kinetics = None,
)

entry(
index = 4,
label = "R-O-H",
group =
"""
1 *1 R!H u0 px cx {2,S} {4,S}
2 *2 O u0 p2 cx {1,S} {3,S}
3 *3 H u0 {2,S}
4 *5 Xo u0 {1,S}
""",
kinetics = None,
)

entry(
index = 5,
label = "O",
group =
"""
1 *4 O u0 p2 c0 {2,D}
2 *6 Xo u0 {1,D}
""",
kinetics = None,
)

entry(
index = 6,
label = "R-CH3",
group =
"""
1 *1 R!H u0 px cx {2,S} {4,S}
2 *2 C u0 p0 c0 {1,S} {3,S} {5,S} {6,S}
3 *3 H u0 {2,S}
4 *5 Xo u0 {1,S}
5 H u0 {2,S}
6 H u0 {2,S}
""",
kinetics = None,
)

tree(
"""
L1: Abstracting
L2: O
L1: Donating
L2: R-C-H
L3: R-CH3
L2: R-O-H
"""
)

forbidden(
label = "Donating_Bidentate",
group =
"""
1 *1 R!H u0 px cx {2,S} {4,S}
2 *2 R u0 px cx {1,S} {3,S}
3 *3 R u0 {2,S}
4 *5 Xo u0 {1,S}
5 Xo u0
"""
)

forbidden(
label="Abstracting_Bidentate",
group =
"""
1 *6 Xo u0 {2,D}
2 *4 R!H u0 px cx {1,D}
3 Xo u0
"""
)

104 changes: 104 additions & 0 deletions input/kinetics/families/Surface_Abstraction_Beta_vdW/rules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/usr/bin/env python
# encoding: utf-8

name = "Surface_Abstraction_Beta_vdW/rules"
shortDesc = u""
longDesc = u"""
"""

entry(
index = 1,
label = "Abstracting;Donating",
kinetics = SurfaceArrheniusBEP(
A = (4.18e17, 'm^2/(mol*s)'),
n = 0.,
alpha =0.94,
E0 = (129.3, 'kJ/mol'),
Tmin = (200, 'K'),
Tmax = (3000, 'K'),
),
rank = 0,
shortDesc = u"""Default""",
longDesc = u"""
BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706
From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111)
"""
)

entry(
index = 2,
label = "O;R-C-H",
kinetics = SurfaceArrheniusBEP(
A = (4.18e17, 'm^2/(mol*s)'),
n = 0.,
alpha =0.94,
E0 = (129.3, 'kJ/mol'),
Tmin = (200, 'K'),
Tmax = (3000, 'K'),
),
rank = 0,
shortDesc = u"""Default""",
longDesc = u"""
BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706
From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111)
"""
)

entry(
index = 3,
label = "O;R-O-H",
kinetics = SurfaceArrheniusBEP(
A = (4.18e17, 'm^2/(mol*s)'),
n = 0.,
alpha =0.65,
E0 = (15.4, 'kJ/mol'),
Tmin = (200, 'K'),
Tmax = (3000, 'K'),
),
rank = 0,
shortDesc = u"""Default""",
longDesc = u"""
BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706
From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111)
"""
)

entry(
index = 4,
label = "Abstracting;R-CH3",
kinetics = SurfaceArrheniusBEP(
A = (1.393e17, 'm^2/(mol*s)'),
n = 0.,
alpha =0.94,
E0 = (129.3, 'kJ/mol'),
Tmin = (200, 'K'),
Tmax = (3000, 'K'),
),
rank = 0,
shortDesc = u"""Default""",
longDesc = u"""
BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706
From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111)
Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms)
"""
)

entry(
index = 5,
label = "O;R-CH3",
kinetics = SurfaceArrheniusBEP(
A = (1.393e17, 'm^2/(mol*s)'),
n = 0.,
alpha =0.94,
E0 = (129.3, 'kJ/mol'),
Tmin = (200, 'K'),
Tmax = (3000, 'K'),
),
rank = 0,
shortDesc = u"""Default""",
longDesc = u"""
BEP values from "Combined DFT, Microkinetic, and Experimental Study of Ethanol Steam Reforming on Pt", Sutton et al., The Journal of Physical Chemistry C, 2013, 117, 4691-4706
From Table 7 includes beta and alpha position. Pre-exponential coefficient is calculated from 1e13 s^-1 (standard guess from transition state theory) divided by 2.39e-9 mol cm^-2 (surface site density of Pt(111)
Divided by 3 because of reaction path degeneracy for CH3 (3 equivalent H atoms)
"""
)
Binary file not shown.
Loading

0 comments on commit 7d83dec

Please sign in to comment.