Skip to content

Commit 52c2fc3

Browse files
authored
Merge pull request #2929 from kirkbadger18/update_charge_Val5
Update charge for Val5, and N
2 parents df834ea + bf6cf96 commit 52c2fc3

6 files changed

Lines changed: 174 additions & 2 deletions

File tree

rmgpy/molecule/atomtype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def get_features(self):
711711
ATOMTYPES['R!H'].set_actions(increment_bond=['R!H'], decrement_bond=['R!H'], form_bond=['R!H'], break_bond=['R!H'], increment_radical=['R!H'], decrement_radical=['R!H'], increment_lone_pair=['R!H'], decrement_lone_pair=['R!H'], increment_charge=['R!H'], decrement_charge=['R!H'])
712712
ATOMTYPES['R!H!Val7'].set_actions(increment_bond=['R!H!Val7'], decrement_bond=['R!H!Val7'], form_bond=['R!H!Val7'], break_bond=['R!H!Val7'], increment_radical=['R!H!Val7'], decrement_radical=['R!H!Val7'], increment_lone_pair=['R!H!Val7'], decrement_lone_pair=['R!H!Val7'], increment_charge=[], decrement_charge=[])
713713
ATOMTYPES['Val4'].set_actions(increment_bond=['Val4'], decrement_bond=['Val4'], form_bond=['Val4'], break_bond=['Val4'], increment_radical=['Val4'], decrement_radical=['Val4'], increment_lone_pair=['Val4'], decrement_lone_pair=['Val4'],increment_charge=[], decrement_charge=[])
714-
ATOMTYPES['Val5'].set_actions(increment_bond=['Val5'], decrement_bond=['Val5'], form_bond=['Val5'], break_bond=['Val5'], increment_radical=['Val5'], decrement_radical=['Val5'], increment_lone_pair=['Val5'], decrement_lone_pair=['Val5'],increment_charge=[], decrement_charge=[])
714+
ATOMTYPES['Val5'].set_actions(increment_bond=['Val5'], decrement_bond=['Val5'], form_bond=['Val5'], break_bond=['Val5'], increment_radical=['Val5'], decrement_radical=['Val5'], increment_lone_pair=['Val5'], decrement_lone_pair=['Val5'],increment_charge=['Val5'], decrement_charge=['Val5'])
715715
ATOMTYPES['Val6'].set_actions(increment_bond=['Val6'], decrement_bond=['Val6'], form_bond=['Val6'], break_bond=['Val6'], increment_radical=['Val6'], decrement_radical=['Val6'], increment_lone_pair=['Val6'], decrement_lone_pair=['Val6'],increment_charge=[], decrement_charge=[])
716716
ATOMTYPES['Val7'].set_actions(increment_bond=['Val7'], decrement_bond=['Val7'], form_bond=['Val7'], break_bond=['Val7'], increment_radical=['Val7'], decrement_radical=['Val7'], increment_lone_pair=['Val7'], decrement_lone_pair=['Val7'],increment_charge=[], decrement_charge=[])
717717

@@ -746,7 +746,7 @@ def get_features(self):
746746
ATOMTYPES['C2tc'].set_actions(increment_bond=[], decrement_bond=['C2d'], form_bond=[], break_bond=[], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=['Ct'], increment_charge=[], decrement_charge=[])
747747
ATOMTYPES['Cq'].set_actions(increment_bond=[], decrement_bond=['Ct'], form_bond=[], break_bond=[], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=[], decrement_charge=[])
748748

749-
ATOMTYPES['N'].set_actions(increment_bond=['N'], decrement_bond=['N'], form_bond=['N'], break_bond=['N'], increment_radical=['N'], decrement_radical=['N'], increment_lone_pair=['N'], decrement_lone_pair=['N'],increment_charge=[], decrement_charge=[])
749+
ATOMTYPES['N'].set_actions(increment_bond=['N'], decrement_bond=['N'], form_bond=['N'], break_bond=['N'], increment_radical=['N'], decrement_radical=['N'], increment_lone_pair=['N'], decrement_lone_pair=['N'],increment_charge=['N'], decrement_charge=['N'])
750750
ATOMTYPES['N0sc'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['N0sc'], break_bond=['N0sc'], increment_radical=['N0sc'], decrement_radical=['N0sc'], increment_lone_pair=[], decrement_lone_pair=['N1s', 'N1sc'],increment_charge=[], decrement_charge=[])
751751
ATOMTYPES['N1s'].set_actions(increment_bond=['N1dc'], decrement_bond=[], form_bond=['N1s'], break_bond=['N1s'], increment_radical=['N1s'], decrement_radical=['N1s'], increment_lone_pair=['N0sc'], decrement_lone_pair=['N3s', 'N3sc'],increment_charge=[], decrement_charge=[])
752752
ATOMTYPES['N1sc'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['N1sc'], break_bond=['N1sc'], increment_radical=['N1sc'], decrement_radical=['N1sc'], increment_lone_pair=[], decrement_lone_pair=['N3s', 'N3sc'],increment_charge=[], decrement_charge=[])

test/rmgpy/data/kinetics/familyTest.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def setup_class(cls):
7272
"R_Addition_COm",
7373
"R_Recombination",
7474
'Surface_Proton_Electron_Reduction_Alpha',
75+
'Surface_Dissociation_Charge_Separation',
7576
],
7677
)
7778
cls.family = cls.database.families["intra_H_migration"]
@@ -291,6 +292,59 @@ def test_intra__h_migration(self):
291292

292293
assert expected_product.is_isomorphic(products[0], mapping)
293294

295+
def test_surface_dissociation_charge_separation(self):
296+
"""
297+
Test that the Surface_Dissociation_Charge_Separation family identifies
298+
reatants and labels them and reacts them properly, and check that the
299+
products are reacted to form the reactants again.
300+
"""
301+
family = self.database.families["Surface_Dissociation_Charge_Separation"]
302+
expected_reactants = [
303+
Molecule().from_adjacency_list(
304+
"""
305+
1 X u0 p0 c0 {2,S}
306+
2 N u0 p0 c+1 {1,S} {3,D} {4,S}
307+
3 O u0 p2 c0 {2,D}
308+
4 O u0 p3 c-1 {2,S}
309+
"""
310+
),
311+
Molecule().from_adjacency_list("1 X u0 p0 c0"),
312+
]
313+
expected_products = [
314+
Molecule().from_adjacency_list(
315+
"""
316+
1 X u0 p0 c0 {2,S}
317+
2 N u0 p1 c0 {1,S} {3,D}
318+
3 O u0 p2 c0 {2,D}
319+
"""
320+
),
321+
Molecule().from_adjacency_list(
322+
"""
323+
1 X u0 p0 c0 {2,D}
324+
2 O u0 p2 c0 {1,D}
325+
"""
326+
),
327+
]
328+
329+
labeled_rxn = Reaction(reactants=expected_reactants, products=expected_products)
330+
family.add_atom_labels_for_reaction(labeled_rxn)
331+
332+
fam_products = family.apply_recipe([m.molecule[0] for m in labeled_rxn.reactants])
333+
assert len(fam_products) == 2
334+
assert expected_products[0].is_isomorphic(fam_products[0])
335+
assert expected_products[1].is_isomorphic(fam_products[1])
336+
337+
fam_reactants = family.apply_recipe(fam_products, forward=False)
338+
assert len(fam_reactants) == 2
339+
assert expected_reactants[0].is_isomorphic(fam_reactants[0])
340+
assert expected_reactants[1].is_isomorphic(fam_reactants[1])
341+
342+
fam_product_species = [Species(molecule=[p]) for p in fam_products]
343+
fam_reactant_species = [Species(molecule=[r]) for r in fam_reactants]
344+
345+
fam_rxn = Reaction(reactants=fam_reactant_species, products=fam_product_species)
346+
assert fam_rxn.is_isomorphic(labeled_rxn)
347+
294348
def test_h_abstraction(self):
295349
"""
296350
Test that the H_Abstraction family returns a properly re-labeled product structure.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+
4+
name = "Surface_Dissociation_Charge_Separation/groups"
5+
shortDesc = u""
6+
longDesc = u"""
7+
Surface bond fission of one species into two distinct adsorbates.
8+
Atom *1 is bonded to the surface (*3). The image below shows a single bond,
9+
but single and double are possible. What matters is that the bond
10+
between *1 and *2 must be single and have charge separation across it.
11+
12+
*1[+]--*2[-] *1 *2
13+
| ----> | ||
14+
~*3~ + ~*4~~ ~*3~ + ~*4~~
15+
16+
The rate, which should be in mol/m2/s,
17+
will be given by k * (mol/m2) * (mol/m2)
18+
so k should be in (m2/mol/s)
19+
"""
20+
21+
template(reactants=["Combined", "VacantSite"], products=["Adsorbate1", "Adsorbate2"], ownReverse=False)
22+
23+
reverse = "Surface_Association_Charge_Separation"
24+
25+
reactantNum=2
26+
productNum=2
27+
28+
recipe(actions=[
29+
['BREAK_BOND', '*1', 1, '*2'],
30+
['FORM_BOND', '*2', 1, '*4'],
31+
['CHANGE_BOND', '*2', 1, '*4'],
32+
['LOSE_PAIR','*2','1'],
33+
['GAIN_PAIR', '*1', '1'],
34+
['LOSE_CHARGE','*1','1'],
35+
['GAIN_CHARGE', '*2', '1'],
36+
])
37+
38+
entry(
39+
index = 1,
40+
label = "Combined",
41+
group =
42+
"""
43+
1 *1 Val5 u0 p0 c+1 {2,S} {3,[S,D]}
44+
2 *2 R!H u0 p[1,2,3] c-1 {1,S}
45+
3 *3 Xo u0 p0 c0 {1,[S,D]}
46+
""",
47+
kinetics = None,
48+
)
49+
50+
entry(
51+
index = 2,
52+
label="VacantSite",
53+
group =
54+
"""
55+
1 *4 Xv u0 p0 c0
56+
""",
57+
kinetics = None,
58+
)
59+
60+
tree(
61+
"""
62+
L1: Combined
63+
L1: VacantSite
64+
"""
65+
)
66+
67+
forbidden(
68+
label = "Surf",
69+
group =
70+
"""
71+
1 *1 Val5 u0 p0 c+1 {2,S} {3,[S,D]}
72+
2 *2 R!H u0 p[1,2,3] c-1 {1,S} {4,[S,D,T]}
73+
3 *3 Xo u0 p0 c0 {1,[S,D]}
74+
4 Xo u0 c0 {2,[S,D,T]}
75+
""",
76+
)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+
4+
name = "Surface_Dissociation_Charge_Separation/rules"
5+
shortDesc = u""
6+
longDesc = u"""
7+
"""
8+
entry(
9+
index = 1,
10+
label = "Combined;VacantSite",
11+
kinetics = SurfaceArrheniusBEP(
12+
A = (9.88e21, 'cm^2/(mol*s)'),
13+
n = 0,
14+
alpha = 0.52,
15+
E0 = (126, 'kJ/mol'),
16+
Tmin = (200, 'K'),
17+
Tmax = (3000, 'K'),
18+
),
19+
rank = 0,
20+
shortDesc = u"""Default""",
21+
longDesc = u"""
22+
This BEP is created from a mixture of data in literature taken from the following papers:
23+
24+
Ma and Schneider
25+
https://doi.org/10.1021/acscatal.8b04251
26+
27+
Gomez-Díaz and Lopez
28+
https://pubs.acs.org/doi/10.1021/jp1093349
29+
30+
Farberow et al.
31+
https://doi.org/10.1021/cs500668k
32+
33+
Deng et al.
34+
https://pubs.rsc.org/en/content/articlelanding/2014/ra/c3ra46544f
35+
36+
and the current manuscript in progress by Badger et al. looking at the effects
37+
of NO on the light out curves for hydrocarbons.
38+
"""
39+
)

test/rmgpy/test_data/testing_database/kinetics/families/Surface_Dissociation_Charge_Separation/training/dictionary.txt

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+

0 commit comments

Comments
 (0)