Example #1
0
def cn(listAtomConnectNitrogen, l_atom_lig):
    """search primary stAtom 
    in: list atom connected of nitrogen, list atom ligand
    out: 1 or 0"""

    stAtom = toolSubstructure.matrixElement(listAtomConnectNitrogen)
    if stAtom == ["N", "C"] or stAtom == ["N", "C"]:
        if toolSubstructure.checkSingleBond(listAtomConnectNitrogen[0], listAtomConnectNitrogen[1]) == 1:
            if toolSubstructure.checkConectOnlyC(listAtomConnectNitrogen[1], l_atom_lig) == 1 : 
                return 1
    return 0
Example #2
0
def cnc(l_atom_connectN, l_atom_lig, more_flex = 0):
    """search secondary connect_element 
    in: list atom connected of nitrogen, list atom ligand
    out: 1 or 0"""

    connect_element = toolSubstructure.matrixElement(l_atom_connectN)

    if connect_element == ["N", "C", "C"]:
#         print "IN - NH2"
        if more_flex == 1 : # more flexible control just connectivity
            #if toolSubstructure.checkConectOnlyC(l_atom_connectN[1], l_atom_lig) == 1 and toolSubstructure.checkConectOnlyC(l_atom_connectN[2], l_atom_lig) == 1:
            #if toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[1]) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[2]) == 1:
            return 1
        else : 
            if toolSubstructure.checkConectOnlyC(l_atom_connectN[1], l_atom_lig) == 1 and toolSubstructure.checkConectOnlyC(l_atom_connectN[2], l_atom_lig) == 1:
                if toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[1]) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[2]) == 1:
                    return 1
    return 0
Example #3
0
def cncc(l_atom_connectN, l_atom_lig, more_flex = 0):
    """
    Search tertiary amine in list of atom lig
    - Append option 
    """

    connect_element = toolSubstructure.matrixElement(l_atom_connectN)
    
    if connect_element == ["N", "C", "C", "C"]:
        
        if more_flex == 1 : 
            #if toolSubstructure.checkCoplanar(l_atom_connectN[0], l_atom_lig) == 1:
            #    if toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[1], d_min = 1.34) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[2], d_min = 1.34) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[3], d_min = 1.34) == 1:
            return 1
        else :     
            if toolSubstructure.checkConectOnlyC(l_atom_connectN[1], l_atom_lig) == 1 and toolSubstructure.checkConectOnlyC(l_atom_connectN[2], l_atom_lig) == 1 and toolSubstructure.checkConectOnlyC(l_atom_connectN[3], l_atom_lig) == 1:
                if toolSubstructure.checkCoplanar(l_atom_connectN[0], l_atom_lig) == 1:
                    if toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[1]) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[2]) == 1 and toolSubstructure.checkSingleBond(l_atom_connectN[0], l_atom_connectN[3]) == 1:
                        return 1
    return 0