From 5c8fdd0dd02e8660ac3e2f615860d94be0bc1530 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Sun, 11 Sep 2016 22:19:26 -0400 Subject: [PATCH 1/7] Moved Lac and Lactum groups in nonacentered solvation groups Caught by fixing bug in parent/child database unit test. Moved them up a group from their original parents because their erroneous parents comment specifically said for noncyclic compounds, while the Lac and Lactum groups are all cyclic. --- input/solvation/groups/nonacentered.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/input/solvation/groups/nonacentered.py b/input/solvation/groups/nonacentered.py index 6f54d12c2a..292052104c 100644 --- a/input/solvation/groups/nonacentered.py +++ b/input/solvation/groups/nonacentered.py @@ -861,21 +861,21 @@ """ L1: R L2: CO + L3: Lac + L4: Lac3 + L4: Lac4 + L4: Lac5 + L4: Lac6 L3: Oss(CdsOd) - L4: Lac - L5: Lac3 - L5: Lac4 - L5: Lac5 - L5: Lac6 L3: Oss(CdsOd)Oss L3: OssH(CdsOd) L3: Cd(Od)Cd=CdCd(Od) + L3: Lactam + L4: Lactam4 + L4: Lactam5 + L4: Lactam6 + L4: Lactam7 L3: Cd(Od)N - L4: Lactam - L5: Lactam4 - L5: Lactam5 - L5: Lactam6 - L5: Lactam7 L4: NCd(Od)N L4: OsCd(Od)N L4: Cd(Od)NCd(Od) From ad6e6230639c1891053cd988059fbac89fcc9351 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Sun, 11 Sep 2016 17:45:38 -0400 Subject: [PATCH 2/7] Made corrections to thermo's groups and polycyclic based on acessibility test groups Cb-CbCbN3s - changed into Cb-N3s, as other Cb are redundant and moved in tree change and move Cs-(N3dN3d)CsCsH because invalid use of N3d, changed single bond to double bond based on examples of other groups change and move Cs-(N3dN3d)CsCsCs beause invalid use of N3d parent was Cs-N3dCsCsCs, changed single bond to double bond based on examples of other groups polycyclic s2_3_5_ene_side: made R to R!H because double bonded s2_3_5_ene_1_side made R to R!H because double bonded s2_3_5_ene - moved in tree to make its child s2_3_5_ene_side acessible s3_5_5_ene_side - made R to R!H because double bonded s3_5_5_ene - moved in tree to make its child s3_5_5_ene_side acessible --- input/thermo/groups/group.py | 82 +++++++++++++++---------------- input/thermo/groups/polycyclic.py | 48 +++++++++--------- 2 files changed, 64 insertions(+), 66 deletions(-) diff --git a/input/thermo/groups/group.py b/input/thermo/groups/group.py index 9b1bbf8df0..23be364dbe 100644 --- a/input/thermo/groups/group.py +++ b/input/thermo/groups/group.py @@ -469,13 +469,11 @@ entry( index = 1821, - label = "Cb-CbCbN3s", + label = "Cb-N3s", group = """ -1 * Cb u0 {2,S} {3,D} {4,S} -2 Cb u0 {1,S} -3 Cb u0 {1,D} -4 N3s u0 {1,S} +1 * Cb u0 {2,S} +2 N3s u0 {1,S} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), @@ -11812,31 +11810,6 @@ """, ) -entry( - index = 1806, - label = "Cs-(N3dN3d)CsCsH", - group = -""" -1 * Cs u0 {2,S} {4,S} {5,S} {6,S} -2 N3d u0 {1,S} {3,S} -3 N3d u0 {2,S} -4 Cs u0 {1,S} -5 Cs u0 {1,S} -6 H u0 {1,S} -""", - thermo = ThermoData( - Tdata = ([300,400,500,600,800,1000,1500],'K'), - Cpdata = ([0,0,0,0,0,0,0],'cal/(mol*K)'), - H298 = (-3.3,'kcal/mol'), - S298 = (-11.7,'cal/(mol*K)'), - ), - shortDesc = u"""""", - longDesc = -u""" - -""", -) - entry( index = 1868, label = "Cs-(N3dOd)CsCsH", @@ -11961,21 +11934,22 @@ ) entry( - index = 1931, - label = "Cs-N3dCsCsCs", + index = 1806, + label = "Cs-(N3dN3d)CsCsH", group = """ -1 * Cs u0 {2,S} {3,S} {4,S} {5,S} -2 N3d u0 {1,S} -3 Cs u0 {1,S} +1 * Cs u0 {2,S} {4,S} {5,S} {6,S} +2 N3d u0 {1,S} {3,D} +3 N3d u0 {2,D} 4 Cs u0 {1,S} 5 Cs u0 {1,S} +6 H u0 {1,S} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), Cpdata = ([0,0,0,0,0,0,0],'cal/(mol*K)'), - H298 = (0,'kcal/mol'), - S298 = (0,'cal/(mol*K)'), + H298 = (-3.3,'kcal/mol'), + S298 = (-11.7,'cal/(mol*K)'), ), shortDesc = u"""""", longDesc = @@ -11990,8 +11964,8 @@ group = """ 1 * Cs u0 {2,S} {4,S} {5,S} {6,S} -2 N3d u0 {1,S} {3,S} -3 N3d u0 {2,S} +2 N3d u0 {1,S} {3,D} +3 N3d u0 {2,D} 4 Cs u0 {1,S} 5 Cs u0 {1,S} 6 Cs u0 {1,S} @@ -12009,6 +11983,30 @@ """, ) +entry( + index = 1931, + label = "Cs-N3dCsCsCs", + group = +""" +1 * Cs u0 {2,S} {3,S} {4,S} {5,S} +2 N3d u0 {1,S} +3 Cs u0 {1,S} +4 Cs u0 {1,S} +5 Cs u0 {1,S} +""", + thermo = ThermoData( + Tdata = ([300,400,500,600,800,1000,1500],'K'), + Cpdata = ([0,0,0,0,0,0,0],'cal/(mol*K)'), + H298 = (0,'kcal/mol'), + S298 = (0,'cal/(mol*K)'), + ), + shortDesc = u"""""", + longDesc = +u""" + +""", +) + entry( index = 1867, label = "Cs-(N3dOd)CsCsCs", @@ -43300,6 +43298,7 @@ L4: Cb-H L4: Cb-Os L4: Cb-Ss + L4: Cb-N3s L4: Cb-C L5: Cb-Cs L5: Cb-Cds @@ -43313,7 +43312,6 @@ L5: Cb-Ct L6: Cb-(CtN3t) L5: Cb-Cb - L6: Cb-CbCbN3s L5: Cb-C=S L3: Ct L4: Ct-CtN3s @@ -43873,15 +43871,15 @@ L4: Cs-NCsCsH L5: Cs-N3sCsCsH L5: Cs-N3dCsCsH - L6: Cs-(N3dN3d)CsCsH L6: Cs-(N3dOd)CsCsH + L6: Cs-(N3dN3d)CsCsH L5: Cs-N5dCsCsH L6: Cs-(N5dOdOs)CsCsH L4: Cs-NCsCsCs L5: Cs-N3sCsCsCs L5: Cs-N3dCsCsCs - L6: Cs-(N3dN3d)CsCsCs L6: Cs-(N3dOd)CsCsCs + L6: Cs-(N3dN3d)CsCsCs L5: Cs-N5dCsCsCs L6: Cs-(N5dOdOs)CsCsCs L4: Cs-NNCsCs diff --git a/input/thermo/groups/polycyclic.py b/input/thermo/groups/polycyclic.py index 680a2d5e13..a51990a1bd 100644 --- a/input/thermo/groups/polycyclic.py +++ b/input/thermo/groups/polycyclic.py @@ -2444,13 +2444,13 @@ label = "s2_3_5_ene_side", group = """ -1 * C u0 {2,S} {4,S} {6,S} -2 C u0 {1,S} {4,S} {5,S} -3 C u0 {5,S} {6,S} {7,D} -4 C u0 {1,S} {2,S} -5 C u0 {2,S} {3,S} -6 C u0 {1,S} {3,S} -7 R ux {3,D} +1 * C u0 {2,S} {4,S} {6,S} +2 C u0 {1,S} {4,S} {5,S} +3 C u0 {5,S} {6,S} {7,D} +4 C u0 {1,S} {2,S} +5 C u0 {2,S} {3,S} +6 C u0 {1,S} {3,S} +7 R!H ux {3,D} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), @@ -2470,13 +2470,13 @@ label = "s2_3_5_ene_1_side", group = """ -1 * C u0 {2,S} {3,S} {4,S} -2 C u0 {1,S} {3,S} {5,S} -3 C u0 {1,S} {2,S} {7,D} -4 C u0 {1,S} {6,S} -5 C u0 {2,S} {6,D} -6 C u0 {4,S} {5,D} -7 R ux {3,D} +1 * C u0 {2,S} {3,S} {4,S} +2 C u0 {1,S} {3,S} {5,S} +3 C u0 {1,S} {2,S} {7,D} +4 C u0 {1,S} {6,S} +5 C u0 {2,S} {6,D} +6 C u0 {4,S} {5,D} +7 R!H ux {3,D} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), @@ -7073,14 +7073,14 @@ label = "s3_5_5_ene_side", group = """ -1 C u0 {3,S} {4,S} {6,S} -2 C u0 {4,S} {5,S} {7,S} -3 * C u0 {1,S} {5,S} {8,D} -4 C u0 {1,S} {2,S} -5 C u0 {2,S} {3,S} -6 C u0 {1,S} {7,S} -7 C u0 {2,S} {6,S} -8 R ux {3,D} +1 C u0 {3,S} {4,S} {6,S} +2 C u0 {4,S} {5,S} {7,S} +3 * C u0 {1,S} {5,S} {8,D} +4 C u0 {1,S} {2,S} +5 C u0 {2,S} {3,S} +6 C u0 {1,S} {7,S} +7 C u0 {2,S} {6,S} +8 R!H ux {3,D} """, thermo = ThermoData( Tdata = ([300,400,500,600,800,1000,1500],'K'), @@ -8593,11 +8593,11 @@ L4: s2_3_4_ene_1 L4: s2_3_4_ene_m L2: s2_3_5 - L3: s2_3_5_ane L3: s2_3_5_ene L4: s2_3_5_ene_1_side L4: s2_3_5_ene_1 L4: s2_3_5_ene_side + L3: s2_3_5_ane L2: s2_3_6 L3: s2_3_6_ane L3: s2_3_6_ene @@ -8779,12 +8779,12 @@ L4: s3_4_6_diene_1_4 L4: s3_4_6_diene_1_5 L2: s3_5_5 - L3: s3_5_5_ane L3: s3_5_5_ene L4: s3_5_5_ene_0 L4: s3_5_5_ene_1 L4: s3_5_5_ene_side L4: s3_5_5_ene_m + L3: s3_5_5_ane L3: s3_5_5_diene L4: s3_5_5_diene_1_4 L2: s3_5_6 From 58866131f5f8b44a23d89e0fc0879b16e614b14a Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Sun, 11 Sep 2016 21:45:07 -0400 Subject: [PATCH 3/7] Fix radical.py for entry acessibility move bicyclo[1.1.1]pentane-C2 up a level in tree move bicyclo[1.1.0]butane-secondary lower in sibling list move cyclopentene-4 up in sibling list to make its child bicyclo[2.1.1]hex-2-ene-C5 acessible moved bicyclo[2.1.0]pent-2-ene-C5 from parent cyclopropane to another parent cyclopentene-4 move tricyclo[2.1.1.0(1,4)]hex-2-ene-C5 to be child of bicyclo[2.1.1]hex-2-ene-C5 move tricyclo[1.1.1.0(1,3)]pentane-C2 to be a child of bicyclo[1.1.1]pentane-C2 move tricyclo[2.1.1.0(1,4)]hexane-C2 up in sibling list move tricyclo[2.1.1.0(1,4)]hexane-C5 to be child of bicyclo[2.1.1]hexane-C5 move bicyclo[4.1.0]heptane-C6-2, bicyclo[4.1.0]heptane-C6-3, bicyclo[4.1.0]heptane-C6-3 up in sibling list above cycloheptane move bicyclo[3.1.1]heptane-C6 up sibling list above cyclobutane move bicyclo[3.1.1]heptane-C2 up sibling list above bicyclo[3.1.0]hexane-C5-2 to make its child tricyclo[3.1.1.0(1,5)]heptane-C2 acessibile move tricyclo[3.1.1.0(1,5)]heptane-C6 up sibling list above bicyclo[1.1.0]butane-secondary move tricyclo[2.2.1.0(1,4)]heptane-C2 up sibling list above cyclobutane move tricyclo[2.2.1.0(1,4)]heptane-C7 up siblig list above bicyclo[2.1.0]pentane-secondary-C3 move bicyclo[4.2.0]octane-C4-7 up sibling list above cyclobutane move bicyclo[2.2.2]octane-C2 up sibling list above cyclobutane for its child tricyclo[2.2.2.0(1,4)]octane-C2 --- input/thermo/groups/radical.py | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/input/thermo/groups/radical.py b/input/thermo/groups/radical.py index 66fa2792b3..8fc70fb1b9 100644 --- a/input/thermo/groups/radical.py +++ b/input/thermo/groups/radical.py @@ -6218,54 +6218,54 @@ L6: C2JC=O L5: Cs_S L6: (Cs)2CsJ + L7: cyclopentene-4 + L8: bicyclo[2.1.1]hex-2-ene-C5 + L9: tricyclo[2.1.1.0(1,4)]hex-2-ene-C5 + L8: bicyclo[2.1.0]pent-2-ene-C5 + L7: bicyclo[1.1.1]pentane-C2 + L8: tricyclo[1.1.1.0(1,3)]pentane-C2 + L7: bicyclo[2.1.1]hexane-C5 + L8: tricyclo[2.1.1.0(1,4)]hexane-C5 L7: cyclopropane - L8: bicyclo[1.1.0]butane-secondary L8: spiro[2.2]pentane-secondary + L8: tricyclo[2.2.1.0(1,4)]heptane-C7 L8: bicyclo[2.1.0]pentane-secondary-C3 - L8: bicyclo[2.1.0]pent-2-ene-C5 - L9: tricyclo[2.1.1.0(1,4)]hex-2-ene-C5 - L8: tricyclo[1.1.1.0(1,3)]pentane-C2 + L8: tricyclo[3.1.1.0(1,5)]heptane-C6 + L8: bicyclo[1.1.0]butane-secondary L8: bicyclo[3.1.0]hexane-C3 - L8: tricyclo[2.1.1.0(1,4)]hexane-C5 L8: bicyclo[4.1.0]heptane-C3-7 L8: bicyclo[4.1.0]heptane-C3-7 - L8: tricyclo[3.1.1.0(1,5)]heptane-C6 - L8: tricyclo[2.2.1.0(1,4)]heptane-C7 + L7: tricyclo[2.1.1.0(1,4)]hexane-C2 + L7: bicyclo[3.1.1]heptane-C6 + L7: tricyclo[2.2.1.0(1,4)]heptane-C2 + L7: bicyclo[4.2.0]octane-C4-7 + L7: bicyclo[2.2.2]octane-C2 + L8: tricyclo[2.2.2.0(1,4)]octane-C2 L7: cyclobutane L8: bicyclo[2.1.0]pentane-secondary-C4 L8: bicyclo[2.2.0]hexane-secondary L8: bicyclo[3.2.0]heptane-C5-6 L7: CCJCOOH - L7: cyclopentene-4 - L8: bicyclo[2.1.1]hex-2-ene-C5 - L7: bicyclo[1.1.1]pentane-C2 + L7: bicyclo[3.1.1]heptane-C2 + L8: tricyclo[3.1.1.0(1,5)]heptane-C2 L7: bicyclo[3.1.0]hexane-C5-2 L7: bicyclo[3.1.0]hexane-C5-3 L7: bicyclo[2.1.1]hexane-C2 - L8: tricyclo[2.1.1.0(1,4)]hexane-C2 - L7: bicyclo[2.1.1]hexane-C5 L7: 7-norbornyl L7: 2-norbornyl + L7: bicyclo[4.1.0]heptane-C6-2 + L7: bicyclo[4.1.0]heptane-C6-3 + L7: bicyclo[4.1.0]heptane-C6-3 L7: cycloheptane L8: bicyclo[3.2.0]heptane-C5-2 L8: bicyclo[3.2.0]heptane-C5-3 L7: bicyclo[4.1.0]heptane-C6-2 - L7: bicyclo[4.1.0]heptane-C6-3 - L7: bicyclo[4.1.0]heptane-C6-2 - L7: bicyclo[4.1.0]heptane-C6-3 - L7: bicyclo[3.1.1]heptane-C2 - L8: tricyclo[3.1.1.0(1,5)]heptane-C2 L7: bicyclo[3.1.1]heptane-C3 L8: tricyclo[3.1.1.0(1,5)]heptane-C3 - L7: bicyclo[3.1.1]heptane-C6 - L7: tricyclo[2.2.1.0(1,4)]heptane-C2 L7: octahydro-pentalene-C5-2 L7: octahydro-pentalene-C5-3 L7: bicyclo[4.2.0]octane-C6-2 L7: bicyclo[4.2.0]octane-C6-3 - L7: bicyclo[4.2.0]octane-C4-7 - L7: bicyclo[2.2.2]octane-C2 - L8: tricyclo[2.2.2.0(1,4)]octane-C2 L7: CCJC L7: RCCJC L7: RCCJCC From c79f637046e11e0461dda32fa7bda67b9837482a Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Mon, 12 Sep 2016 19:00:21 -0400 Subject: [PATCH 4/7] Fix solvation for entry acessibility In nonacentered.py: OxR3, OxR4, OxR5, OxR6 and OxR7, changed R to R!H because they have more than one bond SdOdOdN removed for now cause of multivalent sulfur moved N3sHCd(Od)N3sH up in sibling list In abraham.py: fix definition of Cb-notH, changing Cb to Cbf and R!H to Cbs and changing name to Cbf-notH moved Cbf-notH to be child of Cbf remove SdsOsOdOd because of multivalent sulfur, node was a child of S --- input/solvation/groups/abraham.py | 62 ++++++++-------- input/solvation/groups/nonacentered.py | 98 +++++++++++++------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/input/solvation/groups/abraham.py b/input/solvation/groups/abraham.py index dcaca47ad2..42ec119a32 100644 --- a/input/solvation/groups/abraham.py +++ b/input/solvation/groups/abraham.py @@ -338,15 +338,16 @@ """, ) + entry( index = 37, - label = "Cb-noH", + label = "Cbf-noH", group = """ -1 * Cb u0 {2,B} {3,B} {4,B} +1 * Cbf u0 {2,B} {3,B} {4,B} 2 R!H u0 {1,B} -3 R!H u0 {1,B} -4 R!H u0 {1,B} +3 R!H u0 {1,B} +4 R!H u0 {1,B} """, solute = SoluteData( S = 0.101, @@ -1120,37 +1121,38 @@ """, ) - -entry( - index = 35, - label = "SdsOsOdOd", - group = -""" -1 * Sd u0 {2,D} {3,D} {4,S} {5,S} -2 Od u0 {1,D} -3 Od u0 {1,D} -4 Os u0 {1,S} -5 R u0 {1,S} -""", - solute = SoluteData( - S = -0.505, - B = -0.188, - E = 0.0, - L = 0.0, - A = 0.0, - ), - shortDesc = u"""Platts fragment 35 sulfonate""", - longDesc = -u""" - -""", -) +#removed until we have aromatic sulfurs +# entry( +# index = 35, +# label = "SdsOsOdOd", +# group = +# """ +# 1 * Sd u0 {2,D} {3,D} {4,S} {5,S} +# 2 Od u0 {1,D} +# 3 Od u0 {1,D} +# 4 Os u0 {1,S} +# 5 R u0 {1,S} +# """, +# solute = SoluteData( +# S = -0.505, +# B = -0.188, +# E = 0.0, +# L = 0.0, +# A = 0.0, +# ), +# shortDesc = u"""Platts fragment 35 sulfonate""", +# longDesc = +# u""" + +# """, +# ) tree( """ L1: R L2: C L3: Cbf + L4: Cbf-noH L3: Css L4: CssH3 L4: CssH2 @@ -1164,7 +1166,6 @@ L4: CtOt L3: Cdd L3: Cb - L4: Cb-noH L4: Cb-H L4: Cb-noHnoRing L2: O @@ -1200,7 +1201,6 @@ L4: Ss-aromatic L3: Sd L4: Sds - L5: SdsOsOdOd """ ) diff --git a/input/solvation/groups/nonacentered.py b/input/solvation/groups/nonacentered.py index 292052104c..ed177f0e00 100644 --- a/input/solvation/groups/nonacentered.py +++ b/input/solvation/groups/nonacentered.py @@ -557,9 +557,9 @@ label = "OxR3", group = """ -1 * Os u0 {2,S} {3,S} -2 R u0 {1,S} {3,[S,D,B]} -3 R u0 {1,S} {2,[S,D,B]} +1 * Os u0 {2,S} {3,S} +2 R!H u0 {1,S} {3,[S,D,B]} +3 R!H u0 {1,S} {2,[S,D,B]} """, solute = None, shortDesc = u"""O in a 3 membered ring""", @@ -574,10 +574,10 @@ label = "OxR4", group = """ -1 * Os u0 {2,S} {4,S} -2 R u0 {1,S} {3,[S,D,B]} -3 R u0 {2,[S,D,B]} {4,[S,D,B]} -4 R u0 {1,S} {3,[S,D,B]} +1 * Os u0 {2,S} {4,S} +2 R!H u0 {1,S} {3,[S,D,B]} +3 R!H u0 {2,[S,D,B]} {4,[S,D,B]} +4 R!H u0 {1,S} {3,[S,D,B]} """, solute = None, shortDesc = u"""O in a 4 membered ring""", @@ -592,11 +592,11 @@ label = "OxR5", group = """ -1 * Os u0 {2,S} {5,S} -2 R u0 {1,S} {3,[S,D,B]} -3 R u0 {2,[S,D,B]} {4,[S,D,B]} -4 R u0 {3,[S,D,B]} {5,[S,D,B]} -5 R u0 {1,S} {4,[S,D,B]} +1 * Os u0 {2,S} {5,S} +2 R!H u0 {1,S} {3,[S,D,B]} +3 R!H u0 {2,[S,D,B]} {4,[S,D,B]} +4 R!H u0 {3,[S,D,B]} {5,[S,D,B]} +5 R!H u0 {1,S} {4,[S,D,B]} """, solute = None, shortDesc = u"""O in a 5 membered ring""", @@ -611,12 +611,12 @@ label = "OxR6", group = """ -1 * Os u0 {2,S} {6,S} -2 R u0 {1,S} {3,[S,D,B]} -3 R u0 {2,[S,D,B]} {4,[S,D,B]} -4 R u0 {3,[S,D,B]} {5,[S,D,B]} -5 R u0 {4,[S,D,B]} {6,[S,D,B]} -6 R u0 {1,S} {5,[S,D,B]} +1 * Os u0 {2,S} {6,S} +2 R!H u0 {1,S} {3,[S,D,B]} +3 R!H u0 {2,[S,D,B]} {4,[S,D,B]} +4 R!H u0 {3,[S,D,B]} {5,[S,D,B]} +5 R!H u0 {4,[S,D,B]} {6,[S,D,B]} +6 R!H u0 {1,S} {5,[S,D,B]} """, solute = None, shortDesc = u"""O in a 6 membered ring""", @@ -631,13 +631,13 @@ label = "OxR7", group = """ -1 * Os u0 {2,S} {7,S} -2 R u0 {1,S} {3,[S,D,B]} -3 R u0 {2,[S,D,B]} {4,[S,D,B]} -4 R u0 {3,[S,D,B]} {5,[S,D,B]} -5 R u0 {4,[S,D,B]} {6,[S,D,B]} -6 R u0 {5,[S,D,B]} {7,[S,D,B]} -7 R u0 {1,S} {6,[S,D,B]} +1 * Os u0 {2,S} {7,S} +2 R!H u0 {1,S} {3,[S,D,B]} +3 R!H u0 {2,[S,D,B]} {4,[S,D,B]} +4 R!H u0 {3,[S,D,B]} {5,[S,D,B]} +5 R!H u0 {4,[S,D,B]} {6,[S,D,B]} +6 R!H u0 {5,[S,D,B]} {7,[S,D,B]} +7 R!H u0 {1,S} {6,[S,D,B]} """, solute = None, shortDesc = u"""O in a 7 membered ring""", @@ -647,29 +647,30 @@ """, ) -entry( - index = 26, - label = "SdOdOdN", - group = -""" -1 * Sd u0 {2,D} {3,D} {4,S} -2 Od u0 {1,D} -3 Od u0 {1,D} -4 N u0 {1,S} -""", - solute = SoluteData( - S = -0.569, - B = -0.446, - E = -0.111, - L = 0.0, - A = 0.356, - ), - shortDesc = u"""Platts group 51 sulfonamide -S(O)(O)N- (and fragment 13 for A)""", - longDesc = -u""" +#temporarily removed until multivalent Sulfur is implemented +# entry( +# index = 26, +# label = "SdOdOdN", +# group = +# """ +# 1 * Sd u0 {2,D} {3,D} {4,S} +# 2 Od u0 {1,D} +# 3 Od u0 {1,D} +# 4 N u0 {1,S} +# """, +# solute = SoluteData( +# S = -0.569, +# B = -0.446, +# E = -0.111, +# L = 0.0, +# A = 0.356, +# ), +# shortDesc = u"""Platts group 51 sulfonamide -S(O)(O)N- (and fragment 13 for A)""", +# longDesc = +# u""" -""", -) +# """, +# ) entry( index = 30, @@ -889,12 +890,11 @@ L3: OxR5 L3: OxR6 L3: OxR7 - L2: SdOdOdN L2: N3sH2-benz + L2: N3sHCd(Od)N3sH L2: Cd(Od)NH2 L2: Cd(Od)NHR L3: Cd(Od)NH-arom - L2: N3sHCd(Od)N3sH L2: N3sCd(Od)N3sH L2: CdsNdNsNs """ From 56496e6976cd6b456822e1b1ff38cfaf78836a9f Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Mon, 12 Sep 2016 19:02:13 -0400 Subject: [PATCH 5/7] Fix statmech database for entry acessibility Nitro - change atomtype from N to N5d and move up sibling list above Nitrites Nitrates - change atomtype from N to N5d --- input/statmech/groups/groups.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/input/statmech/groups/groups.py b/input/statmech/groups/groups.py index 4fbb63ef2a..bf03cfe1ed 100644 --- a/input/statmech/groups/groups.py +++ b/input/statmech/groups/groups.py @@ -929,7 +929,7 @@ label = "Nitro", group = """ -1 * N u0 {2,D} {3,S} {4,S} +1 * N5d u0 {2,D} {3,S} {4,S} 2 O u0 {1,D} 3 O u0 {1,S} 4 R!H ux {1,S} @@ -962,10 +962,10 @@ label = "Nitrates", group = """ -1 * N u0 {2,D} {3,S} {4,S} -2 O u0 {1,D} -3 O u0 {1,S} -4 O u0 {1,S} +1 * N5d u0 {2,D} {3,S} {4,S} +2 O u0 {1,D} +3 O u0 {1,S} +4 O u0 {1,S} """, statmech = GroupFrequencies( frequencies = [ @@ -1377,9 +1377,9 @@ L5: Amide_ter L4: Nitrile L4: Nitroso - L5: Nitrites L5: Nitro L6: Nitrates + L5: Nitrites L2: R!Hx1 L3: C_R1 L4: RsCH2r From 4205e6f6398eb2d50a3f848816afc8810d14da87 Mon Sep 17 00:00:00 2001 From: KEHANG Date: Wed, 14 Sep 2016 20:55:01 -0400 Subject: [PATCH 6/7] trigger make test as well since there's already cases where changes made in database can fail RMG-Py unittests at least can alarm developers to be aware of data change is causing potential issues --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1f809dc572..632052cbf2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ install: script: - make test-database + - make test - cd $TRAVIS_BUILD_DIR after_success: From a5e92e8d7b95b4ebd2d4c645094027ceaabaeaa7 Mon Sep 17 00:00:00 2001 From: KEHANG Date: Thu, 15 Sep 2016 14:32:13 -0400 Subject: [PATCH 7/7] fix bug: check entry.item instead entry itself is LogicNode also add an assertion test preventing child is same as parent --- testing/databaseTest.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/testing/databaseTest.py b/testing/databaseTest.py index c77d34943e..6ebf49fb9c 100644 --- a/testing/databaseTest.py +++ b/testing/databaseTest.py @@ -272,6 +272,7 @@ def kinetics_checkGroupsFoundInTree(self, family_name): ascendParent = ascendParent.parent nose.tools.assert_true(ascendParent is not None, "Group {group} in {family} family was found in the tree without a proper parent.".format(group=child, family=family_name)) nose.tools.assert_true(child in ascendParent.children, "Group {group} in {family} family was found in the tree without a proper parent.".format(group=nodeName, family=family_name)) + nose.tools.assert_false(child is ascendParent, "Group {group} in {family} family is a parent to itself".format(group=nodeName, family=family_name)) def kinetics_checkGroupsNonidentical(self, family_name): """ @@ -304,6 +305,9 @@ def kinetics_checkChildParentRelationships(self, family_name): # This is a mistake in the database, but it should be caught by kinetics_checkGroupsFoundInTree # so rather than report it twice or crash, we'll just silently carry on to the next node. continue + elif parentNode in originalFamily.forwardTemplate.products: + #This is a product node made by training reactions which we do not need to check + continue # Check whether the node has proper parents unless it is the top reactant or product node # The parent should be more general than the child nose.tools.assert_true(family.matchNodeToChild(parentNode, childNode), @@ -311,11 +315,11 @@ def kinetics_checkChildParentRelationships(self, family_name): #check that parentNodes which are LogicOr do not have an ancestor that is a Group #If it does, then the childNode must also be a child of the ancestor - if isinstance(parentNode, LogicOr): - ancestorNode = childNode - while ancestorNode not in originalFamily.groups.top and isinstance(ancestorNode, LogicOr): + if isinstance(parentNode.item, LogicOr): + ancestorNode = parentNode + while ancestorNode not in originalFamily.groups.top and isinstance(ancestorNode.item, LogicOr): ancestorNode = ancestorNode.parent - if isinstance(ancestorNode, Group): + if isinstance(ancestorNode.item, Group): nose.tools.assert_true(family.matchNodeToChild(ancestorNode, childNode), "In {family} family, group {ancestor} is not a proper ancestor of its child {child}.".format(family=family_name, ancestor=ancestorNode, child=nodeName)) @@ -394,8 +398,6 @@ def kinetics_checkCdAtomType(self, family_name): family = self.database.kinetics.families[family_name] targetLabel=['Cd', 'CO', 'CS', 'Cdd'] targetAtomTypes=[atomTypes[x] for x in targetLabel] - oxygen=[atomTypes['O']] + atomTypes['O'].specific - sulfur=[atomTypes['S']] + atomTypes['S'].specific #ignore product entries that get created from training reactions ignore=[] @@ -426,8 +428,8 @@ def kinetics_checkCdAtomType(self, family_name): #Ignore ligands that are not double bonded if 'D' in bond.order: for ligAtomType in ligand.atomType: - if ligand.atomType[0] in oxygen: correctAtomList.append('CO') - elif ligand.atomType[0] in sulfur: correctAtomList.append('CS') + if ligand.atomType[0].isSpecificCaseOf(atomTypes['O']): correctAtomList.append('CO') + elif ligand.atomType[0].isSpecificCaseOf(atomTypes['S']): correctAtomList.append('CS') #remove duplicates from correctAtom: correctAtomList=list(set(correctAtomList)) @@ -451,6 +453,7 @@ def general_checkNodesFoundInTree(self, group_name, group): ascendParent = ascendParent.parent nose.tools.assert_true(ascendParent is not None, "Node {node} in {group} group was found in the tree without a proper parent.".format(node=child, group=group_name)) nose.tools.assert_true(child in ascendParent.children, "Node {node} in {group} group was found in the tree without a proper parent.".format(node=nodeName, group=group_name)) + nose.tools.assert_false(child is ascendParent, "Node {node} in {group} is a parent to itself".format(node=nodeName, group=group_name)) def general_checkGroupsNonidentical(self, group_name, group): """ @@ -483,11 +486,11 @@ def general_checkChildParentRelationships(self, group_name, group): #check that parentNodes which are LogicOr do not have an ancestor that is a Group #If it does, then the childNode must also be a child of the ancestor - if isinstance(parentNode, LogicOr): - ancestorNode = childNode - while ancestorNode not in group.top and isinstance(ancestorNode, LogicOr): + if isinstance(parentNode.item, LogicOr): + ancestorNode = parentNode + while ancestorNode not in group.top and isinstance(ancestorNode.item, LogicOr): ancestorNode = ancestorNode.parent - if isinstance(ancestorNode, Group): + if isinstance(ancestorNode.item, Group): nose.tools.assert_true(group.matchNodeToChild(ancestorNode, childNode), "In {group} group, node {ancestor} is not a proper ancestor of its child {child}.".format(group=group_name, ancestor=ancestorNode, child=nodeName)) @@ -522,8 +525,6 @@ def general_checkCdAtomType(self, group_name, group): """ targetLabel=['Cd', 'CO', 'CS', 'Cdd'] targetAtomTypes=[atomTypes[x] for x in targetLabel] - oxygen=[atomTypes['O']] + atomTypes['O'].specific - sulfur=[atomTypes['S']] + atomTypes['S'].specific for entryName, entry in group.entries.iteritems(): if isinstance(entry.item, Group): @@ -543,8 +544,8 @@ def general_checkCdAtomType(self, group_name, group): #Ignore ligands that are not double bonded if 'D' in bond.order: for ligAtomType in ligand.atomType: - if ligand.atomType[0] in oxygen: correctAtomList.append('CO') - elif ligand.atomType[0] in sulfur: correctAtomList.append('CS') + if ligand.atomType[0].isSpecificCaseOf(atomTypes['O']): correctAtomList.append('CO') + elif ligand.atomType[0].isSpecificCaseOf(atomTypes['S']): correctAtomList.append('CS') #remove duplicates from correctAtom: correctAtomList=list(set(correctAtomList))