Skip to content

Commit

Permalink
Merge branch 'main' into adsorbate_resonance
Browse files Browse the repository at this point in the history
  • Loading branch information
bjkreitz authored Nov 29, 2024
2 parents 1ae09c5 + ac71689 commit c3b9e8e
Show file tree
Hide file tree
Showing 65 changed files with 6,230 additions and 684 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
timeout-minutes: 120 # this usually takes 20-45 minutes (or hangs for 6+ hours).
run: |
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator'
- name: Install Q2DTor
run: echo "" | make q2dtor
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
export FAILED=Yes
fi
echo "" # blank line so next block is interpreted as markdown
cat "$regr_test-core.log"
cat "$regr_test-core.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-core.log")
echo "</details>"
echo "<details>"
if python-jl scripts/checkModels.py \
Expand All @@ -313,7 +313,7 @@ jobs:
export FAILED=Yes
fi
echo "" # blank line so next block is interpreted as markdown
cat "$regr_test-edge.log"
cat "$regr_test-edge.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-core.log")
echo "</details>"
# Check for Regression between Reference and Dynamic (skip superminimal)
Expand Down Expand Up @@ -405,3 +405,5 @@ jobs:
with:
push: true
tags: reactionmechanismgenerator/rmg:latest
build-args: |
RMS_Branch=for_rmg
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
timeout-minutes: 120 # this usually takes 20-45 minutes (or hangs for 6+ hours).
run: |
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator'
- name: Checkout gh-pages Branch
uses: actions/checkout@v2
Expand Down
5 changes: 4 additions & 1 deletion arkane/encorr/ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
'Methane',
'Methyl',
'Ammonia',
'Chloromethane'
'Chloromethane',
# Lithium species shall be uncommented after we reconcile the difference in AECs and BACs
# 'Lithium Hydride',
# 'Lithium Fluoride'
]


Expand Down
2 changes: 1 addition & 1 deletion arkane/encorr/bac.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class BAC:
ref_databases = {}
atom_spins = {
'H': 0.5, 'C': 1.0, 'N': 1.5, 'O': 1.0, 'F': 0.5,
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5, 'Li': 0.5,
}
exp_coeff = 3.0 # Melius-type parameter (Angstrom^-1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux

#. Install and Link Julia dependencies: ::

julia -e 'using Pkg; Pkg.add("PyCall");Pkg.build("PyCall");Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator;'
julia -e 'using Pkg; Pkg.add("PyCall");Pkg.build("PyCall");Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator;'

python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"

Expand Down
317 changes: 317 additions & 0 deletions examples/rmg/CO2RR/input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
# Data sources
database(
thermoLibraries=['surfaceThermoPt111', 'primaryThermoLibrary', 'thermo_DFT_CCSDTF12_BAC','DFT_QCI_thermo', 'electrocatThermo',
# 'CO2RR_Adsorbates_Ag111'
],
reactionLibraries = [('Surface/CPOX_Pt/Deutschmann2006_adjusted', False)],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = ['electrochem',
# 'surface',
'Surface_Abstraction',
'Surface_Abstraction_vdW',
'Surface_Abstraction_Single_vdW',
'Surface_Abstraction_Beta_double_vdW',
'Surface_Adsorption_Dissociative',
'Surface_Adsorption_Dissociative_Double',
'Surface_Adsorption_vdW',
'Surface_Dissociation',
'Surface_Dissociation_Double_vdW',
'Surface_Dissociation_vdW',
'Surface_EleyRideal_Addition_Multiple_Bond',
'Surface_Migration',
],
kineticsEstimator = 'rate rules',

)

catalystProperties(
metal = 'Ag111'
)

# List of species
species(
label='CO2',
reactive=True,
structure=adjacencyList(
"""
1 O u0 p2 c0 {2,D}
2 C u0 p0 c0 {1,D} {3,D}
3 O u0 p2 c0 {2,D}
"""),
)


species(
label='proton',
reactive=True,
structure=adjacencyList(
"""
1 H u0 p0 c+1
"""),
)

species(
label='vacantX',
reactive=True,
structure=adjacencyList("1 X u0"),
)

species(
label='H',
reactive=True,
structure=adjacencyList(
"""
1 H u1 p0 c0
"""),
)

species(
label='CO2X',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {3,D}
2 O u0 p2 c0 {3,D}
3 C u0 p0 c0 {1,D} {2,D}
4 X u0 p0 c0
"""),
)

species(
label='CHO2X',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {3,S} {5,S}
2 O u0 p2 c0 {3,D}
3 C u0 p0 c0 {1,S} {2,D} {4,S}
4 H u0 p0 c0 {3,S}
5 X u0 p0 c0 {1,S}
"""),
)

species(
label='CO2HX',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {2,S} {4,S}
2 C u0 p0 c0 {1,S} {3,D} {5,S}
3 O u0 p2 c0 {2,D}
4 H u0 p0 c0 {1,S}
5 X u0 p0 c0 {2,S}
"""),
)

species(
label='OCX',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {2,D}
2 C u0 p0 c0 {1,D} {3,D}
3 X u0 p0 c0 {2,D}
"""),
)

species(
label='OX',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {2,D}
2 X u0 p0 c0 {1,D}
"""),
)

species(
label='CH2O2X',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {3,S} {5,S}
2 O u0 p2 c0 {3,D}
3 C u0 p0 c0 {1,S} {2,D} {4,S}
4 H u0 p0 c0 {3,S}
5 H u0 p0 c0 {1,S}
6 X u0 p0 c0
"""),
)

species(
label='CHOX',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {2,D}
2 C u0 p0 c0 {1,D} {3,S} {4,S}
3 H u0 p0 c0 {2,S}
4 X u0 p0 c0 {2,S}
"""),
)

species(
label='CH2OX',
reactive=True,
structure=adjacencyList("""
1 O u0 p2 c0 {2,D}
2 C u0 p0 c0 {1,D} {3,S} {4,S}
3 H u0 p0 c0 {2,S}
4 H u0 p0 c0 {2,S}
5 X u0 p0 c0
"""),
)


forbidden(
label='CO2-bidentate',
structure=adjacencyList(
"""
1 O u0 p2 c0 {2,D}
2 C u0 p0 c0 {1,D} {3,S} {4,S}
3 X u0 p0 c0 {2,S}
4 O u0 p2 c0 {2,S} {5,S}
5 X u0 p0 c0 {4,S}
"""
)
)

liquidSurfaceReactor(
temperature=(300,'K'),
liqPotential=(0,'V'),
surfPotential=(-2.0,'V'),
initialConcentrations={
"CO2": (1e-3,'mol/cm^3'),
"proton": (1e-4,'mol/m^3'),
},
initialSurfaceCoverages={
# "HX": 0.5,
# # "CXO2": 0.0,
"CHO2X": 0.1,
"CO2HX": 0.1,
"vacantX": 0.1,
"CO2X": 0.4,
'OX': 0.1,
'OCX': 0.1,
'CH2O2X': 0.05,
'CHOX': 0.04,
'CH2OX': 0.01
},
surfaceVolumeRatio=(1.0e5, 'm^-1'),
terminationTime=(1.0e3,'sec'),
# terminationConversion={'CO2': 0.90},
# constantSpecies=["proton"],
)

liquidSurfaceReactor(
temperature=(300,'K'),
liqPotential=(0,'V'),
surfPotential=(-1.5,'V'),
initialConcentrations={
"CO2": (1e-3,'mol/cm^3'),
"proton": (1e-4,'mol/m^3'),
},
initialSurfaceCoverages={
# "HX": 0.5,
# # "CXO2": 0.0,
"CHO2X": 0.1,
"CO2HX": 0.1,
"vacantX": 0.1,
"CO2X": 0.4,
'OX': 0.1,
'OCX': 0.1,
'CH2O2X': 0.05,
'CHOX': 0.04,
'CH2OX': 0.01
},
surfaceVolumeRatio=(1.0e5, 'm^-1'),
terminationTime=(1.0e3,'sec'),
# terminationConversion={'CO2': 0.90},
# constantSpecies=["proton"],
)

liquidSurfaceReactor(
temperature=(300,'K'),
liqPotential=(0,'V'),
surfPotential=(-1.0,'V'),
initialConcentrations={
"CO2": (1e-3,'mol/cm^3'),
"proton": (1e-4,'mol/m^3'),
},
initialSurfaceCoverages={
# "HX": 0.5,
# # "CXO2": 0.0,
"CHO2X": 0.1,
"CO2HX": 0.1,
"vacantX": 0.1,
"CO2X": 0.4,
'OX': 0.1,
'OCX': 0.1,
'CH2O2X': 0.05,
'CHOX': 0.04,
'CH2OX': 0.01
},
surfaceVolumeRatio=(1.0e5, 'm^-1'),
terminationTime=(1.0e3,'sec'),
# terminationConversion={'CO2': 0.90},
# constantSpecies=["proton"],
)

# liquidSurfaceReactor(
# temperature=(300,'K'),
# liqPotential=(0,'V'),
# surfPotential=(-0.5,'V'),
# initialConcentrations={
# "CO2": (1e-3,'mol/cm^3'),
# "proton": (1e-4,'mol/m^3'),
# },
# initialSurfaceCoverages={
# # "HX": 0.5,
# # # "CXO2": 0.0,
# "CHO2X": 0.1,
# "CO2HX": 0.1,
# "vacantX": 0.1,
# "CO2X": 0.4,
# 'OX': 0.1,
# 'OCX': 0.1,
# 'CH2O2X': 0.05,
# 'CHOX': 0.04,
# 'CH2OX': 0.01
# },
# surfaceVolumeRatio=(1.0e5, 'm^-1'),
# terminationTime=(1.0e3,'sec'),
# # terminationConversion={'CO2': 0.90},
# # constantSpecies=["proton"],
# )

solvation(
solvent='water'
)

simulator(
atol=1e-16,
rtol=1e-8,
)

model(
toleranceKeepInEdge=1E-16,
toleranceMoveToCore=1E-3,
toleranceRadMoveToCore=1E-6,
toleranceInterruptSimulation=1E6,
filterReactions=False,
maximumEdgeSpecies=5000,
toleranceBranchReactionToCore=1E-6,
branchingIndex=0.5,
branchingRatioMax=1.0,
)

options(
units='si',
generateOutputHTML=True,
generatePlots=True,
saveEdgeSpecies=True,
saveSimulationProfiles=False,
)

generatedSpeciesConstraints(
allowed=['input species','reaction libraries'],
maximumSurfaceSites=2,
maximumCarbonAtoms=3,
maximumOxygenAtoms=2,
maximumRadicalElectrons=1,
)
Loading

0 comments on commit c3b9e8e

Please sign in to comment.