Skip to content

Commit 8953846

Browse files
sevyharrisrwest
authored andcommitted
Add dissociative desorption to flux pairs
1 parent 8863298 commit 8953846

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

rmgpy/reaction.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,14 +1500,15 @@ def generate_pairs(self):
15001500
performing flux analysis. The exact procedure for doing so depends on
15011501
the reaction type:
15021502
1503-
=================== =============== ========================================
1504-
Reaction type Template Resulting pairs
1505-
=================== =============== ========================================
1506-
Isomerization A -> C (A,C)
1507-
Dissociation A -> C + D (A,C), (A,D)
1508-
Association A + B -> C (A,C), (B,C)
1509-
Bimolecular A + B -> C + D (A,C), (B,D) *or* (A,D), (B,C)
1510-
=================== =============== ========================================
1503+
======================= ==================== ========================================
1504+
Reaction type Template Resulting pairs
1505+
======================= ==================== ========================================
1506+
Isomerization A -> C (A,C)
1507+
Dissociation A -> C + D (A,C), (A,D)
1508+
Association A + B -> C (A,C), (B,C)
1509+
Bimolecular A + B -> C + D (A,C), (B,D) *or* (A,D), (B,C)
1510+
Dissociative Adsorption A + 2X -> CX + DX (A,CX), (A,DX), (X,CX), (X,DX)
1511+
======================= ==================== ========================================
15111512
15121513
There are a number of ways of determining the correct pairing for
15131514
bimolecular reactions. Here we try a simple similarity analysis by comparing
@@ -1521,6 +1522,29 @@ def generate_pairs(self):
15211522
for reactant in self.reactants:
15221523
for product in self.products:
15231524
self.pairs.append((reactant, product))
1525+
elif (len(self.reactants) == 3 and len(self.products) == 2 and \
1526+
len([r for r in self.reactants if r.is_surface_site()]) == 2 and \
1527+
len([r for r in self.reactants if not r.contains_surface_site()]) == 1) or \
1528+
(len(self.products) == 3 and len(self.reactants) == 2 and \
1529+
len([p for p in self.products if p.is_surface_site()]) == 2 and \
1530+
len([p for p in self.products if not p.contains_surface_site()]) == 1):
1531+
# Dissociative adsorption case
1532+
if len(self.reactants) == 3:
1533+
gas_reactant = [r for r in self.reactants if not r.is_surface_site()][0]
1534+
for product in self.products:
1535+
self.pairs.append((gas_reactant, product))
1536+
site1 = [r for r in self.reactants if r.is_surface_site()][0]
1537+
site2 = [r for r in self.reactants if r.is_surface_site()][1]
1538+
self.pairs.append((site1, self.products[0]))
1539+
self.pairs.append((site2, self.products[1]))
1540+
else:
1541+
gas_product = [p for p in self.products if not p.is_surface_site()][0]
1542+
for reactant in self.reactants:
1543+
self.pairs.append((reactant, gas_product))
1544+
site1 = [p for p in self.products if p.is_surface_site()][0]
1545+
site2 = [p for p in self.products if p.is_surface_site()][1]
1546+
self.pairs.append((self.reactants[0], site1))
1547+
self.pairs.append((self.reactants[1], site2))
15241548

15251549
else: # this is the bimolecular case
15261550
reactants = self.reactants[:]

0 commit comments

Comments
 (0)