Skip to content

Commit ac71689

Browse files
authored
Merge pull request #2598 for electrochemistry a.k.a. RMG-electrocat
Electrochemistry! (finally) a.k.a. RMG-electrocat This brings in lots of electrochemistry work, both for CO2 reduction and for Lithium SEI work. See https://chemrxiv.org/engage/chemrxiv/article-details/6695ecaf5101a2ffa87f3953 for the Lithium stuff and https://doi.org/10.17760/D20467257}{10.17760/D20467257 for CO2 reduction. Many thanks to @davidfarinajr @mjohnson541 and @ssun30 Requires updated RMG-database at least at commit 0add9cdee2dd2e0677c765086dbcd471d1377cb4
2 parents 881e246 + 0e524a2 commit ac71689

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6231
-685
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
timeout-minutes: 120 # this usually takes 20-45 minutes (or hangs for 6+ hours).
176176
run: |
177177
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
178-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
178+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator'
179179
180180
- name: Install Q2DTor
181181
run: echo "" | make q2dtor
@@ -296,7 +296,7 @@ jobs:
296296
export FAILED=Yes
297297
fi
298298
echo "" # blank line so next block is interpreted as markdown
299-
cat "$regr_test-core.log"
299+
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")
300300
echo "</details>"
301301
echo "<details>"
302302
if python-jl scripts/checkModels.py \
@@ -313,7 +313,7 @@ jobs:
313313
export FAILED=Yes
314314
fi
315315
echo "" # blank line so next block is interpreted as markdown
316-
cat "$regr_test-edge.log"
316+
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")
317317
echo "</details>"
318318
319319
# Check for Regression between Reference and Dynamic (skip superminimal)
@@ -405,3 +405,5 @@ jobs:
405405
with:
406406
push: true
407407
tags: reactionmechanismgenerator/rmg:latest
408+
build-args: |
409+
RMS_Branch=for_rmg

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
timeout-minutes: 120 # this usually takes 20-45 minutes (or hangs for 6+ hours).
6565
run: |
6666
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
67-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
67+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator'
6868
6969
- name: Checkout gh-pages Branch
7070
uses: actions/checkout@v2

arkane/encorr/ae.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@
7373
'Methane',
7474
'Methyl',
7575
'Ammonia',
76-
'Chloromethane'
76+
'Chloromethane',
77+
# Lithium species shall be uncommented after we reconcile the difference in AECs and BACs
78+
# 'Lithium Hydride',
79+
# 'Lithium Fluoride'
7780
]
7881

7982

arkane/encorr/bac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class BAC:
241241
ref_databases = {}
242242
atom_spins = {
243243
'H': 0.5, 'C': 1.0, 'N': 1.5, 'O': 1.0, 'F': 0.5,
244-
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5
244+
'Si': 1.0, 'P': 1.5, 'S': 1.0, 'Cl': 0.5, 'Br': 0.5, 'I': 0.5, 'Li': 0.5,
245245
}
246246
exp_coeff = 3.0 # Melius-type parameter (Angstrom^-1)
247247

documentation/source/users/rmg/installation/anacondaDeveloper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux
117117

118118
#. Install and Link Julia dependencies: ::
119119

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

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

examples/rmg/CO2RR/input.py

Lines changed: 317 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,317 @@
1+
# Data sources
2+
database(
3+
thermoLibraries=['surfaceThermoPt111', 'primaryThermoLibrary', 'thermo_DFT_CCSDTF12_BAC','DFT_QCI_thermo', 'electrocatThermo',
4+
# 'CO2RR_Adsorbates_Ag111'
5+
],
6+
reactionLibraries = [('Surface/CPOX_Pt/Deutschmann2006_adjusted', False)],
7+
seedMechanisms = [],
8+
kineticsDepositories = ['training'],
9+
kineticsFamilies = ['electrochem',
10+
# 'surface',
11+
'Surface_Abstraction',
12+
'Surface_Abstraction_vdW',
13+
'Surface_Abstraction_Single_vdW',
14+
'Surface_Abstraction_Beta_double_vdW',
15+
'Surface_Adsorption_Dissociative',
16+
'Surface_Adsorption_Dissociative_Double',
17+
'Surface_Adsorption_vdW',
18+
'Surface_Dissociation',
19+
'Surface_Dissociation_Double_vdW',
20+
'Surface_Dissociation_vdW',
21+
'Surface_EleyRideal_Addition_Multiple_Bond',
22+
'Surface_Migration',
23+
],
24+
kineticsEstimator = 'rate rules',
25+
26+
)
27+
28+
catalystProperties(
29+
metal = 'Ag111'
30+
)
31+
32+
# List of species
33+
species(
34+
label='CO2',
35+
reactive=True,
36+
structure=adjacencyList(
37+
"""
38+
1 O u0 p2 c0 {2,D}
39+
2 C u0 p0 c0 {1,D} {3,D}
40+
3 O u0 p2 c0 {2,D}
41+
"""),
42+
)
43+
44+
45+
species(
46+
label='proton',
47+
reactive=True,
48+
structure=adjacencyList(
49+
"""
50+
1 H u0 p0 c+1
51+
"""),
52+
)
53+
54+
species(
55+
label='vacantX',
56+
reactive=True,
57+
structure=adjacencyList("1 X u0"),
58+
)
59+
60+
species(
61+
label='H',
62+
reactive=True,
63+
structure=adjacencyList(
64+
"""
65+
1 H u1 p0 c0
66+
"""),
67+
)
68+
69+
species(
70+
label='CO2X',
71+
reactive=True,
72+
structure=adjacencyList("""
73+
1 O u0 p2 c0 {3,D}
74+
2 O u0 p2 c0 {3,D}
75+
3 C u0 p0 c0 {1,D} {2,D}
76+
4 X u0 p0 c0
77+
"""),
78+
)
79+
80+
species(
81+
label='CHO2X',
82+
reactive=True,
83+
structure=adjacencyList("""
84+
1 O u0 p2 c0 {3,S} {5,S}
85+
2 O u0 p2 c0 {3,D}
86+
3 C u0 p0 c0 {1,S} {2,D} {4,S}
87+
4 H u0 p0 c0 {3,S}
88+
5 X u0 p0 c0 {1,S}
89+
"""),
90+
)
91+
92+
species(
93+
label='CO2HX',
94+
reactive=True,
95+
structure=adjacencyList("""
96+
1 O u0 p2 c0 {2,S} {4,S}
97+
2 C u0 p0 c0 {1,S} {3,D} {5,S}
98+
3 O u0 p2 c0 {2,D}
99+
4 H u0 p0 c0 {1,S}
100+
5 X u0 p0 c0 {2,S}
101+
102+
"""),
103+
)
104+
105+
species(
106+
label='OCX',
107+
reactive=True,
108+
structure=adjacencyList("""
109+
1 O u0 p2 c0 {2,D}
110+
2 C u0 p0 c0 {1,D} {3,D}
111+
3 X u0 p0 c0 {2,D}
112+
"""),
113+
)
114+
115+
species(
116+
label='OX',
117+
reactive=True,
118+
structure=adjacencyList("""
119+
1 O u0 p2 c0 {2,D}
120+
2 X u0 p0 c0 {1,D}
121+
"""),
122+
)
123+
124+
species(
125+
label='CH2O2X',
126+
reactive=True,
127+
structure=adjacencyList("""
128+
1 O u0 p2 c0 {3,S} {5,S}
129+
2 O u0 p2 c0 {3,D}
130+
3 C u0 p0 c0 {1,S} {2,D} {4,S}
131+
4 H u0 p0 c0 {3,S}
132+
5 H u0 p0 c0 {1,S}
133+
6 X u0 p0 c0
134+
"""),
135+
)
136+
137+
species(
138+
label='CHOX',
139+
reactive=True,
140+
structure=adjacencyList("""
141+
1 O u0 p2 c0 {2,D}
142+
2 C u0 p0 c0 {1,D} {3,S} {4,S}
143+
3 H u0 p0 c0 {2,S}
144+
4 X u0 p0 c0 {2,S}
145+
"""),
146+
)
147+
148+
species(
149+
label='CH2OX',
150+
reactive=True,
151+
structure=adjacencyList("""
152+
1 O u0 p2 c0 {2,D}
153+
2 C u0 p0 c0 {1,D} {3,S} {4,S}
154+
3 H u0 p0 c0 {2,S}
155+
4 H u0 p0 c0 {2,S}
156+
5 X u0 p0 c0
157+
"""),
158+
)
159+
160+
161+
forbidden(
162+
label='CO2-bidentate',
163+
structure=adjacencyList(
164+
"""
165+
1 O u0 p2 c0 {2,D}
166+
2 C u0 p0 c0 {1,D} {3,S} {4,S}
167+
3 X u0 p0 c0 {2,S}
168+
4 O u0 p2 c0 {2,S} {5,S}
169+
5 X u0 p0 c0 {4,S}
170+
"""
171+
)
172+
)
173+
174+
liquidSurfaceReactor(
175+
temperature=(300,'K'),
176+
liqPotential=(0,'V'),
177+
surfPotential=(-2.0,'V'),
178+
initialConcentrations={
179+
"CO2": (1e-3,'mol/cm^3'),
180+
"proton": (1e-4,'mol/m^3'),
181+
},
182+
initialSurfaceCoverages={
183+
# "HX": 0.5,
184+
# # "CXO2": 0.0,
185+
"CHO2X": 0.1,
186+
"CO2HX": 0.1,
187+
"vacantX": 0.1,
188+
"CO2X": 0.4,
189+
'OX': 0.1,
190+
'OCX': 0.1,
191+
'CH2O2X': 0.05,
192+
'CHOX': 0.04,
193+
'CH2OX': 0.01
194+
},
195+
surfaceVolumeRatio=(1.0e5, 'm^-1'),
196+
terminationTime=(1.0e3,'sec'),
197+
# terminationConversion={'CO2': 0.90},
198+
# constantSpecies=["proton"],
199+
)
200+
201+
liquidSurfaceReactor(
202+
temperature=(300,'K'),
203+
liqPotential=(0,'V'),
204+
surfPotential=(-1.5,'V'),
205+
initialConcentrations={
206+
"CO2": (1e-3,'mol/cm^3'),
207+
"proton": (1e-4,'mol/m^3'),
208+
},
209+
initialSurfaceCoverages={
210+
# "HX": 0.5,
211+
# # "CXO2": 0.0,
212+
"CHO2X": 0.1,
213+
"CO2HX": 0.1,
214+
"vacantX": 0.1,
215+
"CO2X": 0.4,
216+
'OX': 0.1,
217+
'OCX': 0.1,
218+
'CH2O2X': 0.05,
219+
'CHOX': 0.04,
220+
'CH2OX': 0.01
221+
},
222+
surfaceVolumeRatio=(1.0e5, 'm^-1'),
223+
terminationTime=(1.0e3,'sec'),
224+
# terminationConversion={'CO2': 0.90},
225+
# constantSpecies=["proton"],
226+
)
227+
228+
liquidSurfaceReactor(
229+
temperature=(300,'K'),
230+
liqPotential=(0,'V'),
231+
surfPotential=(-1.0,'V'),
232+
initialConcentrations={
233+
"CO2": (1e-3,'mol/cm^3'),
234+
"proton": (1e-4,'mol/m^3'),
235+
},
236+
initialSurfaceCoverages={
237+
# "HX": 0.5,
238+
# # "CXO2": 0.0,
239+
"CHO2X": 0.1,
240+
"CO2HX": 0.1,
241+
"vacantX": 0.1,
242+
"CO2X": 0.4,
243+
'OX': 0.1,
244+
'OCX': 0.1,
245+
'CH2O2X': 0.05,
246+
'CHOX': 0.04,
247+
'CH2OX': 0.01
248+
},
249+
surfaceVolumeRatio=(1.0e5, 'm^-1'),
250+
terminationTime=(1.0e3,'sec'),
251+
# terminationConversion={'CO2': 0.90},
252+
# constantSpecies=["proton"],
253+
)
254+
255+
# liquidSurfaceReactor(
256+
# temperature=(300,'K'),
257+
# liqPotential=(0,'V'),
258+
# surfPotential=(-0.5,'V'),
259+
# initialConcentrations={
260+
# "CO2": (1e-3,'mol/cm^3'),
261+
# "proton": (1e-4,'mol/m^3'),
262+
# },
263+
# initialSurfaceCoverages={
264+
# # "HX": 0.5,
265+
# # # "CXO2": 0.0,
266+
# "CHO2X": 0.1,
267+
# "CO2HX": 0.1,
268+
# "vacantX": 0.1,
269+
# "CO2X": 0.4,
270+
# 'OX': 0.1,
271+
# 'OCX': 0.1,
272+
# 'CH2O2X': 0.05,
273+
# 'CHOX': 0.04,
274+
# 'CH2OX': 0.01
275+
# },
276+
# surfaceVolumeRatio=(1.0e5, 'm^-1'),
277+
# terminationTime=(1.0e3,'sec'),
278+
# # terminationConversion={'CO2': 0.90},
279+
# # constantSpecies=["proton"],
280+
# )
281+
282+
solvation(
283+
solvent='water'
284+
)
285+
286+
simulator(
287+
atol=1e-16,
288+
rtol=1e-8,
289+
)
290+
291+
model(
292+
toleranceKeepInEdge=1E-16,
293+
toleranceMoveToCore=1E-3,
294+
toleranceRadMoveToCore=1E-6,
295+
toleranceInterruptSimulation=1E6,
296+
filterReactions=False,
297+
maximumEdgeSpecies=5000,
298+
toleranceBranchReactionToCore=1E-6,
299+
branchingIndex=0.5,
300+
branchingRatioMax=1.0,
301+
)
302+
303+
options(
304+
units='si',
305+
generateOutputHTML=True,
306+
generatePlots=True,
307+
saveEdgeSpecies=True,
308+
saveSimulationProfiles=False,
309+
)
310+
311+
generatedSpeciesConstraints(
312+
allowed=['input species','reaction libraries'],
313+
maximumSurfaceSites=2,
314+
maximumCarbonAtoms=3,
315+
maximumOxygenAtoms=2,
316+
maximumRadicalElectrons=1,
317+
)

0 commit comments

Comments
 (0)