Skip to content

Commit 8d45eca

Browse files
authored
Merge pull request #123 from ReactionMechanismGenerator/banSquareBrackets
Ban square brackets in kinetics group names
2 parents 981fcf0 + c6d37dc commit 8d45eca

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

input/kinetics/families/Korcek_step2/groups.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
"""
99

10-
template(reactants=["C1(R)(H)(O[OC3(OH)(R')]C2)"], products=["C1(R)(O)(C2)", "C3(OH)(O)(R')"], ownReverse=False)
10+
template(reactants=["C1(R)(H)(O(OC3(OH)(R'))C2)"], products=["C1(R)(O)(C2)", "C3(OH)(O)(R')"], ownReverse=False)
1111

1212
reverse = "none"
1313

@@ -22,7 +22,7 @@
2222

2323
entry(
2424
index = 1,
25-
label = "C1(R)(H)(O[OC3(OH)(R')]C2)",
25+
label = "C1(R)(H)(O(OC3(OH)(R'))C2)",
2626
group =
2727
"""
2828
1 *1 C u0 {2,S} {4,S} {7,S} {9,S}
@@ -43,7 +43,7 @@
4343

4444
tree(
4545
"""
46-
L1: C1(R)(H)(O[OC3(OH)(R')]C2)
46+
L1: C1(R)(H)(O(OC3(OH)(R'))C2)
4747
"""
4848
)
4949

input/kinetics/families/Korcek_step2/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99
entry(
1010
index = 1,
11-
label = "C1(R)(H)(O[OC3(OH)(R')]C2)",
11+
label = "C1(R)(H)(O(OC3(OH)(R'))C2)",
1212
kinetics = ArrheniusEP(
1313
A = (3e+09, 's^-1'),
1414
n = 1.38,

input/kinetics/families/R_Addition_COm/groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403

404404
entry(
405405
index = 32,
406-
label = "CH[CH3]2",
406+
label = "CH(CH3)2",
407407
group =
408408
"""
409409
1 *2 C u1 {2,S} {3,S} {4,S}
@@ -741,7 +741,7 @@
741741
L4: C_rad/H2/O
742742
L3: C_sec_rad
743743
L4: C_rad/H/NonDeC
744-
L5: CH[CH3]2
744+
L5: CH(CH3)2
745745
L4: C_rad/H/NonDeO
746746
L5: C_rad/H/CsO
747747
L5: C_rad/H/O2

input/kinetics/families/R_Addition_COm/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426

427427
entry(
428428
index = 427,
429-
label = "COm;CH[CH3]2",
429+
label = "COm;CH(CH3)2",
430430
kinetics = ArrheniusEP(
431431
A = (8.61e+07, 'cm^3/(mol*s)', '*|/', 3),
432432
n = 1.36,

input/kinetics/families/R_Addition_CSm/groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403

404404
entry(
405405
index = 32,
406-
label = "CH[CH3]2",
406+
label = "CH(CH3)2",
407407
group =
408408
"""
409409
1 *2 Cs u1 {2,S} {3,S} {4,S}
@@ -687,7 +687,7 @@
687687
L4: C_rad/H2/O
688688
L3: C_sec_rad
689689
L4: C_rad/H/NonDeC
690-
L5: CH[CH3]2
690+
L5: CH(CH3)2
691691
L4: C_rad/H/NonDeO
692692
L5: C_rad/H/CsO
693693
L5: C_rad/H/O2

testing/databaseTest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def kinetics_checkGroupsFoundInTree(self, family_name):
265265
"""
266266
family = self.database.kinetics.families[family_name]
267267
for nodeName, nodeGroup in family.groups.entries.iteritems():
268+
nose.tools.assert_false('[' in nodeName or ']' in nodeName, "Group {group} in {family} family contains square brackets [ ] in the label, which are not allowed.".format(group=nodeName, family=family_name))
268269
ascendParent = nodeGroup
269270
# Check whether the node has proper parents unless it is the top reactant or product node
270271
while ascendParent not in family.groups.top and ascendParent not in family.forwardTemplate.products:

0 commit comments

Comments
 (0)