-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit test that Surface_Adsorption_vdW doesn't adsorb radicals.
Trying to forbid them using the forbidden structures doesn't seem to be working (a bug in is_subgraph_isomorphic?) but making the top level node have multiplicity [1,3] excludes anything with multiplicity 2 and seems to work on a generate_reactions level. Probably a better solution anyway, as it's inefficient to match the node, apply the recipe, generate the products, and *then* discard them as forbidden.
- Loading branch information
Showing
5 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
rmgpy/test_data/testing_database/kinetics/families/Surface_Adsorption_vdW/groups.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
name = "Surface_Adsorption_vdW/groups" | ||
shortDesc = u"" | ||
longDesc = u""" | ||
Physisorption of a gas-phase species onto the surface. | ||
*1 *1 | ||
----> : | ||
~*2~ ~*2~~ | ||
The rate, which should be in mol/m2/s, | ||
will be given by k * (mol/m2) * (mol/m3) | ||
so k should be in (m3/mol/s). We will use sticking coefficients. | ||
""" | ||
|
||
template(reactants=["Adsorbate", "VacantSite"], products=["Adsorbed"], ownReverse=False) | ||
|
||
reverse = "Surface_Desorption_vdW" | ||
|
||
reactantNum=2 | ||
productNum=1 | ||
|
||
recipe(actions=[ | ||
['FORM_BOND', '*1', 0, '*2'] | ||
]) | ||
|
||
entry( | ||
index = 1, | ||
label = "Adsorbate", | ||
group = | ||
""" | ||
multiplicity [1,3] | ||
1 *1 R u0 px c0 | ||
""", | ||
kinetics = None, | ||
) | ||
|
||
entry( | ||
index = 2, | ||
label="VacantSite", | ||
group = | ||
""" | ||
1 *2 Xv u0 p0 c0 | ||
""", | ||
kinetics = None, | ||
) | ||
|
||
|
||
|
||
tree( | ||
""" | ||
L1: Adsorbate | ||
L1: VacantSite | ||
""" | ||
) | ||
|
||
forbidden( | ||
label = "radical1", | ||
group = | ||
""" | ||
1 R u[1,2,3] | ||
""", | ||
shortDesc = u"""Radicals not allowed""", | ||
longDesc = | ||
u""" | ||
""", | ||
) | ||
|
||
|
||
forbidden( | ||
label = "charge1", | ||
group = | ||
""" | ||
1 R ux c+1 | ||
""", | ||
shortDesc = u"""Charges not allowed""", | ||
longDesc = | ||
u""" | ||
""", | ||
) | ||
|
||
forbidden( | ||
label = "charge2", | ||
group = | ||
""" | ||
1 R ux c-1 | ||
""", | ||
shortDesc = u"""Charges not allowed""", | ||
longDesc = | ||
u""" | ||
""", | ||
) |
26 changes: 26 additions & 0 deletions
26
rmgpy/test_data/testing_database/kinetics/families/Surface_Adsorption_vdW/rules.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
name = "Surface_Adsorption_vdW/rules" | ||
shortDesc = u"" | ||
longDesc = u""" | ||
Surface adsorption of a closed-shell gas-phase species forming a van der Waals bond to the surface site | ||
""" | ||
entry( | ||
index = 1, | ||
label = "Adsorbate;VacantSite", | ||
kinetics = StickingCoefficientBEP( | ||
A = 0.1, | ||
n = 0, | ||
alpha = 0, | ||
E0 = (0, 'kcal/mol'), | ||
Tmin = (200, 'K'), | ||
Tmax = (3000, 'K'), | ||
), | ||
rank = 0, | ||
shortDesc = u"""Default""", | ||
longDesc = u"""Made up""" | ||
) | ||
|
||
|
||
|
Empty file.
9 changes: 9 additions & 0 deletions
9
...test_data/testing_database/kinetics/families/Surface_Adsorption_vdW/training/reactions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
name = "Surface_Adsorption_vdW/training" | ||
shortDesc = u"Reaction kinetics used to generate rate rules" | ||
longDesc = u""" | ||
Put kinetic parameters for specific reactions in this file to use as a | ||
training set for generating rate rules to populate this kinetics family. | ||
""" |