Skip to content

Commit ba96873

Browse files
committed
Add dissociative desorption to flux pairs
1 parent 28c096d commit ba96873

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
@@ -1490,14 +1490,15 @@ def generate_pairs(self):
14901490
performing flux analysis. The exact procedure for doing so depends on
14911491
the reaction type:
14921492
1493-
=================== =============== ========================================
1494-
Reaction type Template Resulting pairs
1495-
=================== =============== ========================================
1496-
Isomerization A -> C (A,C)
1497-
Dissociation A -> C + D (A,C), (A,D)
1498-
Association A + B -> C (A,C), (B,C)
1499-
Bimolecular A + B -> C + D (A,C), (B,D) *or* (A,D), (B,C)
1500-
=================== =============== ========================================
1493+
======================= ==================== ========================================
1494+
Reaction type Template Resulting pairs
1495+
======================= ==================== ========================================
1496+
Isomerization A -> C (A,C)
1497+
Dissociation A -> C + D (A,C), (A,D)
1498+
Association A + B -> C (A,C), (B,C)
1499+
Bimolecular A + B -> C + D (A,C), (B,D) *or* (A,D), (B,C)
1500+
Dissociative Adsorption A + 2X -> CX + DX (A,CX), (A,DX), (X,CX), (X,DX)
1501+
======================= ==================== ========================================
15011502
15021503
There are a number of ways of determining the correct pairing for
15031504
bimolecular reactions. Here we try a simple similarity analysis by comparing
@@ -1511,6 +1512,29 @@ def generate_pairs(self):
15111512
for reactant in self.reactants:
15121513
for product in self.products:
15131514
self.pairs.append((reactant, product))
1515+
elif (len(self.reactants) == 3 and len(self.products) == 2 and \
1516+
len([r for r in self.reactants if r.is_surface_site()]) == 2 and \
1517+
len([r for r in self.reactants if not r.contains_surface_site()]) == 1) or \
1518+
(len(self.products) == 3 and len(self.reactants) == 2 and \
1519+
len([p for p in self.products if p.is_surface_site()]) == 2 and \
1520+
len([p for p in self.products if not p.contains_surface_site()]) == 1):
1521+
# Dissociative adsorption case
1522+
if len(self.reactants) == 3:
1523+
gas_reactant = [r for r in self.reactants if not r.is_surface_site()][0]
1524+
for product in self.products:
1525+
self.pairs.append((gas_reactant, product))
1526+
site1 = [r for r in self.reactants if r.is_surface_site()][0]
1527+
site2 = [r for r in self.reactants if r.is_surface_site()][1]
1528+
self.pairs.append((site1, self.products[0]))
1529+
self.pairs.append((site2, self.products[0]))
1530+
else:
1531+
gas_product = [p for p in self.products if not p.is_surface_site()][0]
1532+
for reactant in self.reactants:
1533+
self.pairs.append((reactant, gas_product))
1534+
site1 = [p for p in self.products if p.is_surface_site()][0]
1535+
site2 = [p for p in self.products if p.is_surface_site()][1]
1536+
self.pairs.append((self.reactants[0], site1))
1537+
self.pairs.append((self.reactants[1], site2))
15141538

15151539
else: # this is the bimolecular case
15161540
reactants = self.reactants[:]

0 commit comments

Comments
 (0)