diff --git a/rmgpy/molecule/atomtype.py b/rmgpy/molecule/atomtype.py index 1f2b0d4298..7ee6a1fe98 100644 --- a/rmgpy/molecule/atomtype.py +++ b/rmgpy/molecule/atomtype.py @@ -240,20 +240,56 @@ def get_features(self): ATOMTYPES = {} +ATOMTYPES['Rx'] = AtomType(label='Rx', generic=[], specific=[ + 'H', + 'R', + 'R!H', + 'Rx!H', + 'R!H!Val7', + 'Val4','Val5','Val6','Val7', + 'He','Ne','Ar', + 'C','Ca','Cs','Csc','Cd','CO','CS','Cdd','Cdc','Ctc','Ct','Cb','Cbf','Cq','C2s','C2sc','C2d','C2dc','C2tc', + 'N','N0sc','N1s','N1sc','N1dc','N3s','N3sc','N3d','N3t','N3b','N5sc','N5dc','N5ddc','N5dddc','N5tc','N5b','N5bd', + 'O','Oa','O0sc','O2s','O2sc','O2d','O4sc','O4dc','O4tc','O4b', + 'Si','Sis','Sid','Sidd','Sit','SiO','Sib','Sibf','Siq', + 'P','P0sc','P1s','P1sc','P1dc','P3s','P3d','P3t','P3b','P5s','P5sc','P5d','P5dd','P5dc','P5ddc','P5t','P5td','P5tc','P5b','P5bd', + 'S','Sa','S0sc','S2s','S2sc','S2d','S2dc','S2tc','S4s','S4sc','S4d','S4dd','S4dc','S4b','S4t','S4tdc','S6s','S6sc','S6d','S6dd','S6ddd','S6dc','S6t','S6td','S6tt','S6tdc', + 'Cl','Cl1s', + 'Br','Br1s', + 'I','I1s', + 'F','F1s','X','Xv','Xo']) + +ATOMTYPES['Rx!H'] = AtomType(label='Rx!H', generic=['Rx'], specific=[ + 'R!H', + 'R!H!Val7', + 'Val4','Val5','Val6','Val7', + 'He','Ne','Ar', + 'C','Ca','Cs','Csc','Cd','CO','CS','Cdd','Cdc','Ctc','Ct','Cb','Cbf','Cq','C2s','C2sc','C2d','C2dc','C2tc', + 'N','N0sc','N1s','N1sc','N1dc','N3s','N3sc','N3d','N3t','N3b','N5sc','N5dc','N5ddc','N5dddc','N5tc','N5b','N5bd', + 'O','Oa','O0sc','O2s','O2sc','O2d','O4sc','O4dc','O4tc','O4b', + 'Si','Sis','Sid','Sidd','Sit','SiO','Sib','Sibf','Siq', + 'P','P0sc','P1s','P1sc','P1dc','P3s','P3d','P3t','P3b','P5s','P5sc','P5d','P5dd','P5dc','P5ddc','P5t','P5td','P5tc','P5b','P5bd', + 'S','Sa','S0sc','S2s','S2sc','S2d','S2dc','S2tc','S4s','S4sc','S4d','S4dd','S4dc','S4b','S4t','S4tdc','S6s','S6sc','S6d','S6dd','S6ddd','S6dc','S6t','S6td','S6tt','S6tdc', + 'Cl','Cl1s', + 'Br','Br1s', + 'I','I1s', + 'F','F1s','X','Xv','Xo']) + # Surface sites: -ATOMTYPES['X'] = AtomType(label='X', generic=[], specific=['Xv', 'Xo']) +ATOMTYPES['X'] = AtomType(label='X', generic=['Rx', 'Rx!H'], specific=['Xv', 'Xo']) # Vacant surface site: -ATOMTYPES['Xv'] = AtomType('Xv', generic=['X'], specific=[], +ATOMTYPES['Xv'] = AtomType('Xv', generic=['X','Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0]) # Occupied surface site: -ATOMTYPES['Xo'] = AtomType('Xo', generic=['X'], specific=[], - single=[0, 1, 2, 3, 4, 5, 6, 7, 8], all_double=[0, 1, 2, 3, 4, 5, 6, 7, 8], r_double=[], o_double=[], s_double=[], triple=[0, 1, 2, 3, 4, 5, 6, 7, 8], - quadruple=[0, 1, 2, 3, 4, 5, 6, 7, 8], benzene=[0], lone_pairs=[0]) +ATOMTYPES['Xo'] = AtomType('Xo', generic=['X','Rx', 'Rx!H'], specific=[], + single=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], all_double=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], r_double=[], o_double=[], s_double=[], triple=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + quadruple=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], benzene=[0], lone_pairs=[0]) + # Non-surface atomTypes, R being the most generic: -ATOMTYPES['R'] = AtomType(label='R', generic=[], specific=[ +ATOMTYPES['R'] = AtomType(label='R', generic=['Rx'], specific=[ 'H', 'R!H', 'R!H!Val7', @@ -270,7 +306,7 @@ def get_features(self): 'I','I1s', 'F','F1s']) -ATOMTYPES['R!H'] = AtomType(label='R!H', generic=['R'], specific=[ +ATOMTYPES['R!H'] = AtomType(label='R!H', generic=['R', 'Rx', 'Rx!H'], specific=[ 'Val4','Val5','Val6','Val7', 'He','Ne','Ar', 'C','Ca','Cs','Csc','Cd','CO','CS','Cdd','Cdc','Ctc','Ct','Cb','Cbf','Cq','C2s','C2sc','C2d','C2dc','C2tc', @@ -284,7 +320,7 @@ def get_features(self): 'I','I1s', 'F','F1s']) -ATOMTYPES['R!H!Val7'] = AtomType(label='R!H!Val7', generic=['R'], specific=[ +ATOMTYPES['R!H!Val7'] = AtomType(label='R!H!Val7', generic=['R', 'Rx', 'Rx!H'], specific=[ 'Val4','Val5','Val6', 'He','Ne','Ar', 'C','Ca','Cs','Csc','Cd','CO','CS','Cdd','Cdc','Ctc','Ct','Cb','Cbf','Cq','C2s','C2sc','C2d','C2dc','C2tc', @@ -295,345 +331,347 @@ def get_features(self): 'S','Sa','S0sc','S2s','S2sc','S2d','S2dc','S2tc','S4s','S4sc','S4d','S4dd','S4dc','S4b','S4t','S4tdc','S6s','S6sc','S6d','S6dd','S6ddd','S6dc','S6t','S6td','S6tt','S6tdc', ]) -ATOMTYPES['Val4'] = AtomType(label='Val4', generic=['R', 'R!H', 'R!H!Val7'], specific=[ +ATOMTYPES['Val4'] = AtomType(label='Val4', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[ 'C','Ca','Cs','Csc','Cd','CO','CS','Cq','Cdd','Cdc','Ctc','Ct','Cb','Cbf','C2s','C2sc','C2d','C2dc','C2tc', 'Si','Sis','Sid','Sidd','Sit','SiO','Sib','Sibf','Siq']) -ATOMTYPES['Val5'] = AtomType(label='Val5', generic=['R', 'R!H', 'R!H!Val7'], specific=[ +ATOMTYPES['Val5'] = AtomType(label='Val5', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[ 'N','N0sc','N1s','N1sc','N1dc','N3s','N3sc','N3d','N3t','N3b','N5sc','N5dc','N5ddc','N5dddc','N5tc','N5b','N5bd', 'P','P0sc','P1s','P1sc','P1dc','P3s','P3d','P3t','P3b','P5s','P5sc','P5d','P5dd','P5dc','P5ddc','P5t','P5td','P5tc','P5b','P5bd']) -ATOMTYPES['Val6'] = AtomType(label='Val6', generic=['R', 'R!H', 'R!H!Val7'], specific=[ +ATOMTYPES['Val6'] = AtomType(label='Val6', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[ 'O','Oa','O0sc','O2s','O2sc','O2d','O4sc','O4dc','O4tc','O4b', 'S','Sa','S0sc','S2s','S2sc','S2d','S2dc','S2tc','S4s','S4sc','S4d','S4dd','S4dc','S4b','S4t','S4tdc','S6s','S6sc','S6d','S6dd','S6ddd','S6dc','S6t','S6td','S6tt','S6tdc']) -ATOMTYPES['Val7'] = AtomType(label='Val7', generic=['R', 'R!H'], specific=[ +ATOMTYPES['Val7'] = AtomType(label='Val7', generic=['R', 'R!H', 'Rx', 'Rx!H'], specific=[ 'Cl','Cl1s', 'Br','Br1s', 'I','I1s', 'F','F1s']) -ATOMTYPES['H'] = AtomType('H', generic=['R'], specific=[]) +ATOMTYPES['H'] = AtomType('H', generic=['Rx','R'], specific=[]) -ATOMTYPES['He'] = AtomType('He', generic=['R', 'R!H', 'R!H!Val7'], specific=[]) -ATOMTYPES['Ne'] = AtomType('Ne', generic=['R', 'R!H', 'R!H!Val7'], specific=[]) -ATOMTYPES['Ar'] = AtomType('Ar', generic=['R', 'R!H', 'R!H!Val7'], specific=[]) +ATOMTYPES['He'] = AtomType('He', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[]) +ATOMTYPES['Ne'] = AtomType('Ne', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[]) +ATOMTYPES['Ar'] = AtomType('Ar', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[]) -ATOMTYPES['C'] = AtomType('C', generic=['R', 'R!H', 'R!H!Val7', 'Val4'], specific=['Ca', 'Cs', 'Csc', 'Cd', 'CO', 'Cq', 'CS', 'Cdd', 'Cdc', 'Ctc', 'Ct', 'Cb', 'Cbf', 'C2s', 'C2sc', 'C2d', 'C2dc', 'C2tc'], +ATOMTYPES['C'] = AtomType('C', generic=['R', 'R!H', 'R!H!Val7', 'Val4', 'Rx', 'Rx!H'], specific=['Ca', 'Cs', 'Csc', 'Cd', 'CO', 'Cq', 'CS', 'Cdd', 'Cdc', 'Ctc', 'Ct', 'Cb', 'Cbf', 'C2s', 'C2sc', 'C2d', 'C2dc', 'C2tc'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) # todo: double check to see if quadruple should be blank or 0 for all of these as well as being 1 for quadruple -ATOMTYPES['Ca'] = AtomType('Ca', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 4) +ATOMTYPES['Ca'] = AtomType('Ca', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 4) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for Ca: atomic carbon (closed shell) -ATOMTYPES['Cs'] = AtomType('Cs', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 4-8) +ATOMTYPES['Cs'] = AtomType('Cs', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 4-8) single=[0,1,2,3,4], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for Cs: C, CC, -ATOMTYPES['Csc'] = AtomType('Csc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 3-6) +ATOMTYPES['Csc'] = AtomType('Csc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 3-6) single=[0,1,2,3], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for Csc: C1=CCC([O-])[CH+]1, O[O+]=C[C+]C([O-])[O-] -ATOMTYPES['Cd'] = AtomType('Cd', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['Cd'] = AtomType('Cd', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[1], r_double=[1], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for Cd: C=C, C=N -ATOMTYPES['Cdc'] = AtomType('Cdc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6) +ATOMTYPES['Cdc'] = AtomType('Cdc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0,1], all_double=[1], r_double=[0, 1], o_double=[0, 1], s_double=[0, 1], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for Cdc: [CH+]=C=[CH-], [CH+]=N[O-] (one of the res structures of Fulminic acid) -ATOMTYPES['CO'] = AtomType('CO', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['CO'] = AtomType('CO', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[1], r_double=[0], o_double=[1], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for CO: C=O -ATOMTYPES['CS'] = AtomType('CS', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['CS'] = AtomType('CS', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[1], r_double=[0], o_double=[0], s_double=[1], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for CS: C=S -ATOMTYPES['Cdd'] = AtomType('Cdd', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 8) +ATOMTYPES['Cdd'] = AtomType('Cdd', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[2], r_double=[0, 1, 2], o_double=[0, 1, 2], s_double=[0, 1, 2], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for Cdd: O=C=O, C=C=C -ATOMTYPES['Ct'] = AtomType('Ct', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['Ct'] = AtomType('Ct', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for Ct: C#C, C#N -ATOMTYPES['Ctc'] = AtomType('Ctc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6) +ATOMTYPES['Ctc'] = AtomType('Ctc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for Ctc: [C+]#[C-] -ATOMTYPES['Cb'] = AtomType('Cb', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], +ATOMTYPES['Cb'] = AtomType('Cb', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[1, 2], lone_pairs=[], charge=[]) # examples for Cb: benzene (C6H6) -ATOMTYPES['Cbf'] = AtomType('Cbf', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], +ATOMTYPES['Cbf'] = AtomType('Cbf', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[3], lone_pairs=[], charge=[]) # examples for Cbf: Naphthalene -ATOMTYPES['Cq'] = AtomType('Cq', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], +ATOMTYPES['Cq'] = AtomType('Cq', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[1], benzene=[0], lone_pairs=[], charge=[]) # examples for Cq: C2 -ATOMTYPES['C2s'] = AtomType('C2s', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 4-6) +ATOMTYPES['C2s'] = AtomType('C2s', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 4-6) single=[0,1,2], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for C2s: singlet[CH2] -ATOMTYPES['C2sc'] = AtomType('C2sc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 5-8) +ATOMTYPES['C2sc'] = AtomType('C2sc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 5-8) single=[0,1,2,3], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1]) # examples for C2sc: [CH2-][N+]#N -ATOMTYPES['C2d'] = AtomType('C2d', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 6) +ATOMTYPES['C2d'] = AtomType('C2d', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for C2d: singlet[C]=C -ATOMTYPES['C2dc'] = AtomType('C2dc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['C2dc'] = AtomType('C2dc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1]) # examples for C2dc: C=[C-][N+]#N, [CH-]=[N+]=O, [CH+]=C=[CH-] -ATOMTYPES['C2tc'] = AtomType('C2tc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4'], specific=[], # (shared electrons = 8) +ATOMTYPES['C2tc'] = AtomType('C2tc', generic=['R', 'R!H', 'R!H!Val7', 'C', 'Val4', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1]) # examples for C2tc: [C-]#[O+], H[N+]#[C-] -ATOMTYPES['N'] = AtomType('N', generic=['R', 'R!H', 'R!H!Val7', 'Val5'], specific=['N0sc', 'N1s', 'N1sc', 'N1dc', 'N3s', 'N3sc', 'N3d', 'N3t', 'N3b', 'N5sc', 'N5dc', 'N5ddc', 'N5dddc', 'N5tc', 'N5b', 'N5bd'], +ATOMTYPES['N'] = AtomType('N', generic=['R', 'R!H', 'R!H!Val7', 'Val5', 'Rx', 'Rx!H'], specific=['N0sc', 'N1s', 'N1sc', 'N1dc', 'N3s', 'N3sc', 'N3d', 'N3t', 'N3b', 'N5sc', 'N5dc', 'N5ddc', 'N5dddc', 'N5tc', 'N5b', 'N5bd'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) -ATOMTYPES['N0sc'] = AtomType('N0sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['N0sc'] = AtomType('N0sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[3], charge=[-2]) # examples for N0sc: [NH+]#[N+][N-2] with adjList 1 N u0 p0 c+1 {2,S} {3,T}; 2 H u0 p0 c0 {1,S}; 3 N u0 p0 c+1 {1,T} {4,S}; 4 N u0 p3 c-2 {3,S} -ATOMTYPES['N1s'] = AtomType('N1s', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 5-6) +ATOMTYPES['N1s'] = AtomType('N1s', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 5-6) single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for N1s: closed shell N-N, closed shell NH -ATOMTYPES['N1sc'] = AtomType('N1sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['N1sc'] = AtomType('N1sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # examples for N1sc: [NH-][S+]=C, [NH-][N+]#C -ATOMTYPES['N1dc'] = AtomType('N1dc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 8) +ATOMTYPES['N1dc'] = AtomType('N1dc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # examples for N1dc: [N-]=[N+]=N terminal nitrogen on azide (two lone pairs), [N-]=[NH+], [N-]=[SH+] -ATOMTYPES['N3s'] = AtomType('N3s', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 5-8) +ATOMTYPES['N3s'] = AtomType('N3s', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 5-8) single=[0,1,2,3], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for N3s: NH3, NH2, NH, N, C[NH]... -ATOMTYPES['N3sc'] = AtomType('N3sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 4-6) +ATOMTYPES['N3sc'] = AtomType('N3sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 4-6) single=[0,1,2], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[+1]) # examples for N3sc: !! N3sc should eventually be deleted, see #1206 -ATOMTYPES['N3d'] = AtomType('N3d', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['N3d'] = AtomType('N3d', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for N3d: N=O, N=N, C=N, [O]N=O, [N]=O, [N]=C -ATOMTYPES['N3t'] = AtomType('N3t', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 8) +ATOMTYPES['N3t'] = AtomType('N3t', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for N3t: N2, N#C, N#[C], N#CC -ATOMTYPES['N3b'] = AtomType('N3b', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], +ATOMTYPES['N3b'] = AtomType('N3b', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[1], charge=[0]) # examples for N3b: Oxazole, Pyridine, Pyrazine, 1,3,5-Triazine, Benzimidazole, Purine -ATOMTYPES['N5sc'] = AtomType('N5sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 4-8) +ATOMTYPES['N5sc'] = AtomType('N5sc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 4-8) single=[0,1,2,3,4], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], benzene=[0], lone_pairs=[0], charge=[+1, +2]) # examples for N5sc: [NH3+][O-] -ATOMTYPES['N5dc'] = AtomType('N5dc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['N5dc'] = AtomType('N5dc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for N5dc: O[N+](=O)(O-) nitrate group, [N+](=O)(O)[O-], O=[N+][O-], [N+](=O)(O[N+](=O)[O-])[O-], C=[N+]=[SH-], [NH2+]=[SH-] -ATOMTYPES['N5ddc'] = AtomType('N5ddc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 8) +ATOMTYPES['N5ddc'] = AtomType('N5ddc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for N5ddc: N=[N+]=[N-] center nitrogen on azide, [N-]=[N+]=O, C=[N+]=[SH-] -ATOMTYPES['N5dddc'] = AtomType('N5dddc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 6) +ATOMTYPES['N5dddc'] = AtomType('N5dddc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0], all_double=[3], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[-1]) # examples for N5dddc: C=[N-](=C)=[NH2+] -ATOMTYPES['N5tc'] = AtomType('N5tc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['N5tc'] = AtomType('N5tc', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for N5tc: C[N+]#[C-] isocyano group, N#[N+][O-], [NH+]#[C-] (note that C- has p1 here), [N+]#[C-] (note that C- has p1 here), [O-][N+]#C (one of the res structures of Fulminic acid), C[N+]#[C-] (note that C- has p1 here) -ATOMTYPES['N5b'] = AtomType('N5b', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], +ATOMTYPES['N5b'] = AtomType('N5b', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[0], charge=[0, +1]) # examples for N5b: Pyrrole, Indole, Benzimidazole, Purine; Note that this is the only N atomtype with valence 5 which isn't necessarily charged. -ATOMTYPES['N5bd'] = AtomType('N5bd', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5'], specific=[], +ATOMTYPES['N5bd'] = AtomType('N5bd', generic=['R', 'R!H', 'R!H!Val7', 'N', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[2], lone_pairs=[0], charge=[0]) # examples for N5bd: AdjList """1 N u0 p0 c0 {2,B} {6,B} {7,D} 2 C u0 p0 {1,B} {3,B} {8,S} 3 C u0 p0 {2,B} {4,B} {9,S} 4 C u0 p0 {3,B} {5,B} {10,S} 5 C u0 p0 {4,B} {6,B} {11,S} 6 N u0 p1 {1,B} {5,B} 7 O u0 p2 c0 {1,D} 8 H u0 p0 {2,S} 9 H u0 p0 {3,S} 10 H u0 p0 {4,S} 11 H u0 p0 {5,S}""" -ATOMTYPES['O'] = AtomType('O', generic=['R', 'R!H', 'R!H!Val7', 'Val6'], specific=['Oa', 'O0sc', 'O2s', 'O2sc', 'O2d', 'O4sc', 'O4dc', 'O4tc', 'O4b'], +ATOMTYPES['O'] = AtomType('O', generic=['R', 'R!H', 'R!H!Val7', 'Val6', 'Rx', 'Rx!H'], specific=['Oa', 'O0sc', 'O2s', 'O2sc', 'O2d', 'O4sc', 'O4dc', 'O4tc', 'O4b'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) -ATOMTYPES['Oa'] = AtomType('Oa', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 6) +ATOMTYPES['Oa'] = AtomType('Oa', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[3], charge=[0]) # examples for Oa: atomic oxygen (closed shell) -ATOMTYPES['O0sc'] = AtomType('O0sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 8) +ATOMTYPES['O0sc'] = AtomType('O0sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[3], charge=[-1]) # examples for O0sc: Nitric acid O[N+](=O)([O-]) -ATOMTYPES['O2s'] = AtomType('O2s', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 8) +ATOMTYPES['O2s'] = AtomType('O2s', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0,1,2], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for O2s: H2O, OH, CH3OH -ATOMTYPES['O2sc'] = AtomType('O2sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 6) +ATOMTYPES['O2sc'] = AtomType('O2sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[+1]) # examples for O2sc: C=[S-][O+] -ATOMTYPES['O2d'] = AtomType('O2d', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 8) +ATOMTYPES['O2d'] = AtomType('O2d', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for O2d: CO2, CH2O -ATOMTYPES['O4sc'] = AtomType('O4sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 5-8) +ATOMTYPES['O4sc'] = AtomType('O4sc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 5-8) single=[0,1,2,3], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[+1]) # examples for O4sc: [O-][OH+]C -ATOMTYPES['O4dc'] = AtomType('O4dc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['O4dc'] = AtomType('O4dc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[+1]) # examples for O4dc: the positively charged O in ozone [O-][O+]=O -ATOMTYPES['O4tc'] = AtomType('O4tc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], # (shared electrons = 8) +ATOMTYPES['O4tc'] = AtomType('O4tc', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[1], charge=[+1]) # examples for O4tc: [C-]#[O+] -ATOMTYPES['O4b'] = AtomType('O4b', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6'], specific=[], +ATOMTYPES['O4b'] = AtomType('O4b', generic=['R', 'R!H', 'R!H!Val7', 'O', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[1], charge=[0]) # examples for O4b: Furane, Benzofurane, Oxazole... -ATOMTYPES['Ne'] = AtomType('Ne', generic=['R', 'R!H', 'R!H!Val7'], specific=[]) -ATOMTYPES['Si'] = AtomType('Si', generic=['R', 'R!H', 'R!H!Val7', 'Val4'], specific=['Sis', 'Sid', 'Sidd', 'Sit', 'SiO', 'Sib', 'Sibf', 'Siq'], +ATOMTYPES['Ne'] = AtomType('Ne', generic=['R', 'R!H', 'R!H!Val7', 'Rx', 'Rx!H'], specific=[]) +ATOMTYPES['Si'] = AtomType('Si', generic=['R', 'R!H', 'R!H!Val7', 'Val4', 'Rx', 'Rx!H'], specific=['Sis', 'Sid', 'Sidd', 'Sit', 'SiO', 'Sib', 'Sibf', 'Siq'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) -ATOMTYPES['Sis'] = AtomType('Sis', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sis'] = AtomType('Sis', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['SiO'] = AtomType('SiO', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['SiO'] = AtomType('SiO', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[1], r_double=[], o_double=[1], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['Sid'] = AtomType('Sid', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sid'] = AtomType('Sid', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[1], r_double=[], o_double=[0], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['Sidd'] = AtomType('Sidd', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sidd'] = AtomType('Sidd', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[2], r_double=[0, 1, 2], o_double=[0, 1, 2], s_double=[0, 1, 2], triple=[0], quadruple=[], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['Sit'] = AtomType('Sit', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sit'] = AtomType('Sit', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['Sib'] = AtomType('Sib', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sib'] = AtomType('Sib', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[2], lone_pairs=[], charge=[]) -ATOMTYPES['Sibf'] = AtomType('Sibf', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Sibf'] = AtomType('Sibf', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[3], lone_pairs=[], charge=[]) -ATOMTYPES['Siq'] = AtomType('Siq', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4'], specific=[], +ATOMTYPES['Siq'] = AtomType('Siq', generic=['R', 'R!H', 'R!H!Val7', 'Si', 'Val4', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[1], benzene=[0], lone_pairs=[], charge=[]) -ATOMTYPES['P'] = AtomType('P', generic=['R', 'R!H', 'R!H!Val7', 'Val5'], specific=['P0sc', 'P1s', 'P1sc', 'P1dc', 'P3s', 'P3d', 'P3t', 'P3b', 'P5s', 'P5sc', 'P5d', 'P5dd', 'P5dc', 'P5ddc', 'P5t', 'P5td', 'P5tc', 'P5b', 'P5bd'], +ATOMTYPES['P'] = AtomType('P', generic=['R', 'R!H', 'R!H!Val7', 'Val5', 'Rx', 'Rx!H'], specific=['P0sc', 'P1s', 'P1sc', 'P1dc', 'P3s', 'P3d', 'P3t', 'P3b', 'P5s', 'P5sc', 'P5d', 'P5dd', 'P5dc', 'P5ddc', 'P5t', 'P5td', 'P5tc', 'P5b', 'P5bd'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) -ATOMTYPES['P0sc'] = AtomType('P0sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P0sc'] = AtomType('P0sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[3], charge=[-2]) # examples for P0sc: [PH-2] (Phosphanediide), [P-2][P+]#[PH+] with adjList '''1 P u0 p3 c-2 {2,S} 2 P u0 p0 c+1 {1,S} {3,T} 3 P u0 p0 c+1 {2,T} {4,S} 4 H u0 p0 c0 {3,S}''' -ATOMTYPES['P1s'] = AtomType('P1s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P1s'] = AtomType('P1s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for P1s: closed shell [PH] (Phosphinidene) -ATOMTYPES['P1sc'] = AtomType('P1sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P1sc'] = AtomType('P1sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # examples for P1sc: C[PH-] (methylphosphanide) -ATOMTYPES['P1dc'] = AtomType('P1dc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P1dc'] = AtomType('P1dc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # examples for P1dc: C=[P-] (methylidenephosphanide) -ATOMTYPES['P3s'] = AtomType('P3s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P3s'] = AtomType('P3s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for P3s: PH3, PCl3 -ATOMTYPES['P3d'] = AtomType('P3d', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P3d'] = AtomType('P3d', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for P3d: O=[PH] with adjList '''1 O u0 p2 c0 {2,D} 2 P u0 p1 c0 {1,D} {3,S} 3 H u0 p0 c0 {2,S}''' -ATOMTYPES['P3t'] = AtomType('P3t', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P3t'] = AtomType('P3t', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for P3t: P#P (diphosphorus) -ATOMTYPES['P3b'] = AtomType('P3b', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P3b'] = AtomType('P3b', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[1], charge=[0]) # examples for P3b: c1ccpcc1 (phosphorine) with InChI 'InChI=1S/C5H5P/c1-2-4-6-5-3-1/h1-5H' -ATOMTYPES['P5s'] = AtomType('P5s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5s'] = AtomType('P5s', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3,4,5], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0]) # examples for P5s: P(Cl)(Cl)(Cl)(Cl)Cl (phosphorus pentachloride) -ATOMTYPES['P5sc'] = AtomType('P5sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5sc'] = AtomType('P5sc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3,4,5,6], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], benzene=[0], lone_pairs=[0], charge=[-1, +1, +2]) # examples for P5sc: [O-][PH3+] (oxidophosphanium), F[P-](F)(F)(F)(F)F (Hexafluorophosphate) -ATOMTYPES['P5d'] = AtomType('P5d', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5d'] = AtomType('P5d', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0]) # examples for P5d: OP(=O)(O)O (phosphoric acid) -ATOMTYPES['P5dd'] = AtomType('P5dd', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5dd'] = AtomType('P5dd', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0]) # examples for P5dd: CP(=O)=O (methylphosphinate) -ATOMTYPES['P5dc'] = AtomType('P5dc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5dc'] = AtomType('P5dc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for P5dc: C=C[P+](=N)[O-] (ethenyl-imino-oxidophosphanium), C[P+](=C)C (methylenedimethylphosphorane) -ATOMTYPES['P5ddc'] = AtomType('P5ddc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5ddc'] = AtomType('P5ddc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for P5ddc: C=[P+]=N (imino(methylidene)phosphanium) -ATOMTYPES['P5t'] = AtomType('P5t', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5t'] = AtomType('P5t', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1,2], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for P5t: N#P(Cl)Cl (phosphonitrile chloride) -ATOMTYPES['P5td'] = AtomType('P5td', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5td'] = AtomType('P5td', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for P5td: COC(=O)C#P=O (methyl phosphorylacetate) -ATOMTYPES['P5tc'] = AtomType('P5tc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5tc'] = AtomType('P5tc', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[+1]) # examples for P5tc: C[P+]#C (methyl(methylidyne)phosphanium), C#[P+]O (hydroxy(methylidyne)phosphanium) -ATOMTYPES['P5b'] = AtomType('P5b', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5b'] = AtomType('P5b', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[0], charge=[0, +1]) # examples for P5b: C1=CC=[PH+]C=C1 (Phosphoniabenzene) -ATOMTYPES['P5bd'] = AtomType('P5bd', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5'], specific=[], +ATOMTYPES['P5bd'] = AtomType('P5bd', generic=['R', 'R!H', 'R!H!Val7', 'P', 'Val5', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[2], lone_pairs=[0], charge=[0]) # examples for P5bd: C1=CC=P(=S)C=C1 (Phosphorin 1-sulfide), C1=CC=P(=O)C=C1 (Phosphorin 1-oxide) -ATOMTYPES['S'] = AtomType('S', generic=['R', 'R!H', 'R!H!Val7', 'Val6'], specific=['Sa', 'S0sc', 'S2s', 'S2sc', 'S2d', 'S2dc', 'S2tc', 'S4s', 'S4sc', 'S4d', 'S4dd', 'S4dc', 'S4b', 'S4t', 'S4tdc', 'S6s', 'S6sc', 'S6d', 'S6dd', 'S6ddd', 'S6dc', 'S6t', 'S6td', 'S6tt', 'S6tdc'], +ATOMTYPES['S'] = AtomType('S', generic=['R', 'R!H', 'R!H!Val7', 'Val6', 'Rx', 'Rx!H'], specific=['Sa', 'S0sc', 'S2s', 'S2sc', 'S2d', 'S2dc', 'S2tc', 'S4s', 'S4sc', 'S4d', 'S4dd', 'S4dc', 'S4b', 'S4t', 'S4tdc', 'S6s', 'S6sc', 'S6d', 'S6dd', 'S6ddd', 'S6dc', 'S6t', 'S6td', 'S6tt', 'S6tdc'], single=[], all_double=[], r_double=[], o_double=[], s_double=[], triple=[], quadruple=[], benzene=[], lone_pairs=[], charge=[]) -ATOMTYPES['Sa'] = AtomType('Sa', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 6) +ATOMTYPES['Sa'] = AtomType('Sa', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6) single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[3], charge=[0]) # examples for Sa: atomic sulfur (closed shell) -ATOMTYPES['S0sc'] = AtomType('S0sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 7-8) +ATOMTYPES['S0sc'] = AtomType('S0sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-8) single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[3], charge=[-1]) # examples for S0sc: [S-][S+]=S -ATOMTYPES['S2s'] = AtomType('S2s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 6-8) +ATOMTYPES['S2s'] = AtomType('S2s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-8) single=[0,1,2], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for S2s: [S], [SH], S {H2S}, [S][S], SS {H2S2}, SSC, CSSC, SO {HSOH}... -ATOMTYPES['S2sc'] = AtomType('S2sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 7-10) +ATOMTYPES['S2sc'] = AtomType('S2sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-10) single=[0,1,2,3], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1, +1]) # examples for S2sc: N#[N+][S-](O)O -ATOMTYPES['S2d'] = AtomType('S2d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 8) +ATOMTYPES['S2d'] = AtomType('S2d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8) single=[0], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[0]) # examples for S2d: S=S, C=S, S=O, S=N, S=C=S, S=C=O, S=C=S... -ATOMTYPES['S2dc'] = AtomType('S2dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S2dc'] = AtomType('S2dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[1, 2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # *Composite atomtype; examples for S2dc: [SH-]=[N+] -ATOMTYPES['S2tc'] = AtomType('S2tc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 10) +ATOMTYPES['S2tc'] = AtomType('S2tc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 10) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[2], charge=[-1]) # examples for S2tc: [S-]#[NH+] -ATOMTYPES['S4s'] = AtomType('S4s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 6-10) +ATOMTYPES['S4s'] = AtomType('S4s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-10) single=[0,1,2,3,4], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for S4s: H4S, SH3CH3... -ATOMTYPES['S4sc'] = AtomType('S4sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 5-8) +ATOMTYPES['S4sc'] = AtomType('S4sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 5-8) single=[0,1,2,3,4,5], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1, +1]) # examples for S4sc: CS[S+]([O-])C, O[SH..-][N+]#N -ATOMTYPES['S4d'] = AtomType('S4d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 8-10) +ATOMTYPES['S4d'] = AtomType('S4d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8-10) single=[0,1,2], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for S4d: O=S(O)O {Sulfurous acid} -ATOMTYPES['S4dd'] = AtomType('S4dd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 10) +ATOMTYPES['S4dd'] = AtomType('S4dd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 10) single=[0], all_double=[2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for S4dd: O=S=O -ATOMTYPES['S4dc'] = AtomType('S4dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S4dc'] = AtomType('S4dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3,4,5], all_double=[1, 2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1, +1]) # *Composite atomtype; examples for S4dc: [CH2-][S+]=C {where the [CH2-] has a lone pair}, [O+][S-](=O)=O, [O-][S+]=C, [NH-][S+]=C {where the [NH-] has two lone pairs}, [O-][S+]=O -ATOMTYPES['S4b'] = AtomType('S4b', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S4b'] = AtomType('S4b', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[], benzene=[2], lone_pairs=[1], charge=[0]) # examples for S4b: Thiophene, Benzothiophene, Benzo[c]thiophene, Thiazole, Benzothiazole... -ATOMTYPES['S4t'] = AtomType('S4t', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 10) +ATOMTYPES['S4t'] = AtomType('S4t', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 10) single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[1], quadruple=[], benzene=[0], lone_pairs=[1], charge=[0]) # examples for S4t: C#S, C#SO, C#[S] -ATOMTYPES['S4tdc'] = AtomType('S4tdc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S4tdc'] = AtomType('S4tdc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0,1,2], all_double=[0, 1, 2], r_double=[], o_double=[], s_double=[], triple=[1, 2], quadruple=[], benzene=[0], lone_pairs=[1], charge=[-1, +1]) # *Composite atomtype; examples for S4tdc: [C-]#[S+] -ATOMTYPES['S6s'] = AtomType('S6s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 6-12) +ATOMTYPES['S6s'] = AtomType('S6s', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 6-12) single=[0,1,2,3,4,5,6], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6s: H6S, F6S -ATOMTYPES['S6sc'] = AtomType('S6sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 7-14) +ATOMTYPES['S6sc'] = AtomType('S6sc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 7-14) single=[0,1,2,3,4,5,6,7], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[-1, +1, +2]) # examples for S6sc: [O-][S+2](O)(O)[O-]CS(=O) -ATOMTYPES['S6d'] = AtomType('S6d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 8-12) +ATOMTYPES['S6d'] = AtomType('S6d', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 8-12) single=[0,1,2,3,4], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6d: [SH4]=O, SF4=O, [SH4]=C, C[SH3]=C... -ATOMTYPES['S6dd'] = AtomType('S6dd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 10-12) +ATOMTYPES['S6dd'] = AtomType('S6dd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 10-12) single=[0,1,2], all_double=[2], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6dd: S(=O)(=O)(O)O {H2SO4, Sulfuric acid}, Perfluorooctanesulfonic acid, Pyrosulfuric acid, Thiosulfuric acid {middle S}, OS(=O)(=O)OOS(=O)(=O)O -ATOMTYPES['S6ddd'] = AtomType('S6ddd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 12) +ATOMTYPES['S6ddd'] = AtomType('S6ddd', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 12) single=[0], all_double=[3], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6ddd: O=S(=O)(=O) -ATOMTYPES['S6dc'] = AtomType('S6dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S6dc'] = AtomType('S6dc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3,4,5], all_double=[1, 2, 3], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[-1, +1, +2]) # *Composite atomtype; examples for S6dc: O=[S+2]([O-])[O-], [CH-]=[SH3+], [CH-]=[SH2+]O, [CH-][SH2+], O=[S+](=O)[O-], [OH+]=[S-](=O)=O -ATOMTYPES['S6t'] = AtomType('S6t', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 9-12) +ATOMTYPES['S6t'] = AtomType('S6t', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 9-12) single=[0,1,2,3], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6t: H3S#N -ATOMTYPES['S6td'] = AtomType('S6td', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 11-12) +ATOMTYPES['S6td'] = AtomType('S6td', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 11-12) single=[0,1], all_double=[1], r_double=[], o_double=[], s_double=[], triple=[1], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6td: HS(=O)#N -ATOMTYPES['S6tt'] = AtomType('S6tt', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], # (shared electrons = 12) +ATOMTYPES['S6tt'] = AtomType('S6tt', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], # (shared electrons = 12) single=[0], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[2], quadruple=[], benzene=[0], lone_pairs=[0], charge=[0]) # examples for S6tt: N#S#N -ATOMTYPES['S6tdc'] = AtomType('S6tdc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6'], specific=[], +ATOMTYPES['S6tdc'] = AtomType('S6tdc', generic=['R', 'R!H', 'R!H!Val7', 'S', 'Val6', 'Rx', 'Rx!H'], specific=[], single=[0,1,2,3,4], all_double=[0, 1, 2], r_double=[], o_double=[], s_double=[], triple=[1, 2], quadruple=[], benzene=[0], lone_pairs=[0], charge=[-1, +1]) # *Composite atomtype; examples for S6tdc: [SH2+]#[C-], [N-]=[S+]#N -ATOMTYPES['Cl'] = AtomType('Cl', generic=['R', 'R!H', 'Val7'], specific=['Cl1s']) -ATOMTYPES['Cl1s'] = AtomType('Cl1s', generic=['R', 'R!H', 'Cl', 'Val7'], specific=[], +ATOMTYPES['Cl'] = AtomType('Cl', generic=['R', 'R!H', 'Val7', 'Rx', 'Rx!H'], specific=['Cl1s']) +ATOMTYPES['Cl1s'] = AtomType('Cl1s', generic=['R', 'R!H', 'Cl', 'Val7', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[3], charge=[0]) # examples for Cl1s: HCl, [Cl] -ATOMTYPES['Br'] = AtomType('Br', generic=['R', 'R!H', 'Val7'], specific=['Br1s']) -ATOMTYPES['Br1s'] = AtomType('Br1s', generic=['R', 'R!H', 'Br', 'Val7'], specific=[], +ATOMTYPES['Br'] = AtomType('Br', generic=['R', 'R!H', 'Val7', 'Rx', 'Rx!H'], specific=['Br1s']) +ATOMTYPES['Br1s'] = AtomType('Br1s', generic=['R', 'R!H', 'Br', 'Val7', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[3], charge=[0]) # examples for Br1s: HBr, [Br] -ATOMTYPES['I'] = AtomType('I', generic=['R', 'R!H', 'Val7'], specific=['I1s']) -ATOMTYPES['I1s'] = AtomType('I1s', generic=['R', 'R!H', 'I', 'Val7'], specific=[], +ATOMTYPES['I'] = AtomType('I', generic=['R', 'R!H', 'Val7', 'Rx', 'Rx!H'], specific=['I1s']) +ATOMTYPES['I1s'] = AtomType('I1s', generic=['R', 'R!H', 'I', 'Val7', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[3], charge=[0]) # examples for I1s: HI, [I], IO, CH3I, I2 -ATOMTYPES['F'] = AtomType('F', generic=['R', 'R!H', 'Val7'], specific=['F1s']) -ATOMTYPES['F1s'] = AtomType('F1s', generic=['R', 'R!H', 'F', 'Val7'], specific=[], +ATOMTYPES['F'] = AtomType('F', generic=['R', 'R!H', 'Val7', 'Rx', 'Rx!H'], specific=['F1s']) +ATOMTYPES['F1s'] = AtomType('F1s', generic=['R', 'R!H', 'F', 'Val7', 'Rx', 'Rx!H'], specific=[], single=[0,1], all_double=[0], r_double=[], o_double=[], s_double=[], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[3], charge=[0]) # examples for F1s: HF, [F], FO, CH3F, F2 +ATOMTYPES['Rx'].set_actions(increment_bond=['Rx'], decrement_bond=['Rx'], form_bond=['Rx'], break_bond=['Rx'], increment_radical=['Rx'], decrement_radical=['Rx'], increment_lone_pair=['Rx'], decrement_lone_pair=['Rx']) +ATOMTYPES['Rx!H'].set_actions(increment_bond=['Rx!H'], decrement_bond=['Rx!H'], form_bond=['Rx!H'], break_bond=['Rx!H'], increment_radical=['Rx!H'], decrement_radical=['Rx!H'], increment_lone_pair=['Rx!H'], decrement_lone_pair=['Rx!H']) ATOMTYPES['X'].set_actions(increment_bond=['X'], decrement_bond=['X'], form_bond=['X'], break_bond=['X'], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[]) ATOMTYPES['Xv'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['Xo'], break_bond=[], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[]) ATOMTYPES['Xo'].set_actions(increment_bond=['Xo'], decrement_bond=['Xo'], form_bond=[], break_bond=['Xv'], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[]) diff --git a/rmgpy/molecule/group.py b/rmgpy/molecule/group.py index 8e00284968..f4b0649c0d 100644 --- a/rmgpy/molecule/group.py +++ b/rmgpy/molecule/group.py @@ -806,9 +806,9 @@ def get_order_str(self): values.append('B') elif value == 0: values.append('vdW') - elif value == 0.1: + elif abs(value - 0.1) < 1e-4: values.append('H') - elif value == 0.05: + elif abs(value - 0.05) < 1e-4: values.append('R') else: raise TypeError('Bond order number {} is not hardcoded as a string'.format(value)) @@ -940,6 +940,23 @@ def is_van_der_waals(self, wildcards=False): else: return abs(self.order[0]) <= 1e-9 and len(self.order) == 1 + + def is_reaction_bond(self, wildcards=False): + """ + Return ``True`` if the bond represents a van der Waals bond or ``False`` if + not. If `wildcards` is ``False`` we return False anytime there is more + than one bond order, otherwise we return ``True`` if any of the options + are van der Waals. + """ + if wildcards: + for order in self.order: + if abs(order[0] - 0.05) <= 1e-9: + return True + else: + return False + else: + return abs(self.order[0]-0.05) <= 1e-9 and len(self.order) == 1 + def is_benzene(self, wildcards=False): """ Return ``True`` if the bond represents a benzene bond or ``False`` if @@ -1375,10 +1392,12 @@ def clear_reg_dims(self): atm.reg_dim_atm = [[], []] atm.reg_dim_u = [[], []] atm.reg_dim_r = [[], []] + atm.reg_dim_site = [[],[]] + atm.reg_dim_morphology = [[],[]] for bd in self.get_all_edges(): bd.reg_dim = [[], []] - def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_splits=None): + def get_extensions(self, r=None, r_bonds=None, r_un=None, basename='', atm_ind=None, atm_ind2=None, n_splits=None): """ generate all allowed group extensions and their complements note all atomtypes except for elements and r/r!H's must be removed @@ -1387,7 +1406,10 @@ def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_spl extents=list, RnH=list, typ=list) extents = [] - + if r_bonds is None: + r_bonds = [1, 1.5, 2, 3, 4] + if r_un is None: + r_un = [0, 1, 2, 3] if n_splits is None: n_splits = len(self.split()) @@ -1396,11 +1418,12 @@ def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_spl r = elements.bde_elements # set of possible r elements/atoms r = [ATOMTYPES[x] for x in r] - r_bonds = [1, 2, 3, 1.5, 4] - r_un = [0, 1, 2, 3] - - RnH = r[:] - RnH.remove(ATOMTYPES['H']) + R = r[:] + if ATOMTYPES['X'] in R: + R.remove(ATOMTYPES['X']) + RnH = R[:] + if ATOMTYPES['H'] in RnH: + RnH.remove(ATOMTYPES['H']) atoms = self.atoms if atm_ind is None: @@ -1409,9 +1432,12 @@ def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_spl if atm.reg_dim_atm[0] == []: if len(typ) == 1: if typ[0].label == 'R': - extents.extend(self.specify_atom_extensions(i, basename, r)) # specify types of atoms + extents.extend(self.specify_atom_extensions(i, basename, R)) # specify types of atoms elif typ[0].label == 'R!H': extents.extend(self.specify_atom_extensions(i, basename, RnH)) + elif typ[0].label == 'Rx': + extents.extend(self.specify_atom_extensions(i, basename, r)) + else: extents.extend(self.specify_atom_extensions(i, basename, typ)) else: @@ -1420,6 +1446,9 @@ def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_spl extents.extend( self.specify_atom_extensions(i, basename, atm.reg_dim_atm[0])) # specify types of atoms elif typ[0].label == 'R!H': + extents.extend( + self.specify_atom_extensions(i, basename, list(set(atm.reg_dim_atm[0]) & set(R)))) + elif typ[0].label == 'Rx': extents.extend( self.specify_atom_extensions(i, basename, list(set(atm.reg_dim_atm[0]) & set(r)))) else: @@ -1473,9 +1502,11 @@ def get_extensions(self, r=None, basename='', atm_ind=None, atm_ind2=None, n_spl if atm.reg_dim_atm[0] == []: if len(typ) == 1: if typ[0].label == 'R': - extents.extend(self.specify_atom_extensions(i, basename, r)) # specify types of atoms + extents.extend(self.specify_atom_extensions(i, basename, R)) # specify types of atoms elif typ[0].label == 'R!H': extents.extend(self.specify_atom_extensions(i, basename, RnH)) + elif typ[0].label == 'Rx': + extents.extend(self.specify_atom_extensions(i, basename, r)) else: extents.extend(self.specify_atom_extensions(i, basename, typ)) else: @@ -1702,7 +1733,8 @@ def specify_bond_extensions(self, i, j, basename, r_bonds): grps = [] label_list = [] Rbset = set(r_bonds) - bdict = {1: '-', 2: '=', 3: '#', 1.5: '-=', 4: '$'} + bdict = {1: '-', 2: '=', 3: '#', 1.5: '-=', 4: '$', 0.05: '..', 0: '--'} + for bd in r_bonds: grp = deepcopy(self) grpc = deepcopy(self) @@ -1738,8 +1770,14 @@ def specify_bond_extensions(self, i, j, basename, r_bonds): else: atom_type_j_str = atom_type_j[0].label + b = None + for v in bdict.keys(): + if abs(v - bd) < 1e-4: + b = bdict[v] + + grps.append((grp, grpc, - basename + '_Sp-' + str(i + 1) + atom_type_i_str + bdict[bd] + str(j + 1) + atom_type_j_str, + basename + '_Sp-' + str(i + 1) + atom_type_i_str + b + str(j + 1) + atom_type_j_str, 'bondExt', (i, j))) return grps diff --git a/rmgpy/molecule/molecule.py b/rmgpy/molecule/molecule.py index 21e5007c4d..03727be792 100644 --- a/rmgpy/molecule/molecule.py +++ b/rmgpy/molecule/molecule.py @@ -230,7 +230,10 @@ def equivalent(self, other, strict=True): and self.radical_electrons == atom.radical_electrons and self.lone_pairs == atom.lone_pairs and self.charge == atom.charge - and self.atomtype is atom.atomtype) + and self.atomtype is atom.atomtype + and self.site == atom.site + and self.morphology == atom.morphology) + else: return self.element is atom.element elif isinstance(other, gr.GroupAtom): @@ -2401,10 +2404,12 @@ def to_group(self): charge=[atom.charge], lone_pairs=[atom.lone_pairs], label=atom.label, + site=[atom.site] if atom.site else [], + morphology=[atom.morphology] if atom.morphology else [], ) - group = gr.Group(atoms=list(group_atoms.values()), multiplicity=[self.multiplicity], metal=[self.metal], - facet=[self.facet]) + group = gr.Group(atoms=list(group_atoms.values()), multiplicity=[self.multiplicity], metal=[self.metal] if self.metal else [], + facet=[self.facet] if self.facet else []) # Create GroupBond for each bond between atoms in the molecule for atom in self.atoms: diff --git a/test/rmgpy/molecule/groupTest.py b/test/rmgpy/molecule/groupTest.py index 39be1721c9..b980621d0c 100644 --- a/test/rmgpy/molecule/groupTest.py +++ b/test/rmgpy/molecule/groupTest.py @@ -1625,3 +1625,21 @@ def test_get_element_count(self): expected = {"C": 1, "N": 1, "P": 1} result = group.get_element_count() assert expected == result + + def test_is_reaction_bond(self): + """ + Test the is_reaction_bond() function + """ + group = Group().from_adjacency_list(""" + 1 R!H u1 {2,R} {3,vdW} + 2 R u0 {1,R} + 3 H u0 {1,vdW} {4,S} + 4 O u0 p2 {3,S}""") + + bdr = group.atoms[1].bonds[group.atoms[0]] + bdv = group.atoms[0].bonds[group.atoms[2]] + bds = group.atoms[2].bonds[group.atoms[3]] + assert bdr.is_reaction_bond() + assert not bdv.is_reaction_bond() + assert not bds.is_reaction_bond() +