Esempio n. 1
0
def CheckCNS(mol, detail=False, showSMILES=False):
    """
    Check mol under CNS
    
    Reference:
        Jeffrey, Phil, and Scott Summerfield.
        Neurobiol Dis, 37.1 (2010): 33-37.
        
    Rule details:
        135 <= weight <= 582
        -0.2 <= logP <= 6.1
        nha <= 5
        nhd <= 3
        3 <= TPSA <= 118
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of REOS
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    nHA = molproperty.CalculateNumHAcceptors(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    #Determine whether the molecular match each rule
    aMW = (135 <= MW <= 582)
    alogP = (-0.2 <= logP <= 6.1)
    anHD = (nHD <= 3)
    anHA = (nHA <= 5)
    atPSA = (3 <= tPSA <= 118)
    #Give the advice
    if (aMW & alogP & anHD & anHA & atPSA):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 5 - (aMW + alogP + anHD + anHA + atPSA)
    #res
    if detail:
        items = ['MW', 'logP', 'nHD', 'nHA', 'tPSA', 'Disposed', 'nViolate']
        vals = (MW, logP, nHD, nHA, tPSA, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 2
0
def CheckOralMacrocycles(mol, detail=False, showSMILES=False):
    """
    Check molecular under oral macrocycles rules
    
    Reference:
        Giordanetto, Fabrizio, and Jan Kihlberg.
        Journal of medicinal chemistry 57.2 (2013): 278-295.        

    Rule details:
        MW < 1000
        logP < 10
        nHD < 5
        TPSA < 250
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of Lipinskin's rule
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    #Determine whether the molecular match each rule
    aMW = (MW < 1000)
    alogP = (logP < 10)
    anHD = (nHD < 5)
    aPSA = (tPSA < 250)
    #Give the advice
    if (aMW & alogP & anHD & aPSA):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violate rules
    nviolate = 4 - (aMW + alogP + anHD + aPSA)
    #res
    if detail:
        items = ['MW', 'logP', 'nHD', 'tPSA', 'Disposed', 'nViolate']
        vals = (MW, logP, nHD, tPSA, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 3
0
def CheckRo4(mol, detail=False, showSMILES=False):
    """
    Referenece:
        
    Rule details:
        MW <= 400
        logP <= 4
        nHD <= 4
        nHA <= 8
        TPSA <= 120
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of REOS
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    nHA = molproperty.CalculateNumHAcceptors(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    #Determine whether the molecular match each rule
    aMW = (MW <= 400)
    alogP = (logP <= 4)
    anHD = (nHD <= 4)
    anHA = (nHA <= 8)
    atPSA = (tPSA <= 120)
    #Give the advice
    if (aMW & alogP & anHD & anHA & atPSA):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 5 - (anHD + anHA + aMW + alogP + atPSA)
    #res
    if detail:
        items = ['MW', 'logP', 'nHD', 'nHA', 'tPSA', 'Disposed', 'nViolate']
        vals = (MW, logP, nHD, nHA, tPSA, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 4
0
def CheckVeberRule(mol, detail=False, showSMILES=False):
    """
    Bad or Good oral biovailability rule
    
    Reference:
        Veber, Daniel F., et al.
        Journal of medicinal chemistry 45.12 (2002): 2615-2623.
        
    Rule details:
        nRot <= 10
        TPSA <= 140
        nHB <= 12
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of Veber's rule
    nRot = molproperty.CalculateNumRotatableBonds(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    nHB = molproperty.CalculateNumHyBond(mol)
    #Determine whether the molecular match each rule
    anRot = (nRot <= 10)
    atPSA = (tPSA <= 140)
    anHB = (nHB <= 12)
    #Give the advice
    if (anRot & atPSA & anHB):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 3 - (anRot + atPSA + anHB)
    #res
    if detail:
        items = ['nRot', 'tPSA', 'nHB', 'Disposed', 'nViolate']
        vals = [nRot, tPSA, nHB, disposed, nviolate]
    else:
        items = ['Disposed', 'nViolate']
        vals = [disposed, nviolate]

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 5
0
def CheckPfizerRule(mol, detail=False, showSMILES=False):
    """
    Check molecular under Rfizer Rule(3/75 Rule)
    
    Reference:
        Hughes, Jason D., et al. 
        Bioorganic & medicinal chemistry letters 18.17 (2008): 4872-4875.
        
    Rule details:
        logp > 3
        TPSA < 75
        
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties
    logP = molproperty.CalculateLogP(mol)
    PSA = molproperty.CalculateTPSA(mol)
    #Determine whether the molecular match each rule
    alogP = (logP > 3)
    aPSA = (PSA < 75)
    #Give the advice
    if alogP & aPSA:
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 2 - (alogP + aPSA)
    #res
    if detail:
        items = ['logP', 'PSA', 'Disposed', 'nViolate']
        vals = (logP, PSA, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 6
0
def CheckEganRule(mol, detail=False, showSMILES=False):
    """
    Bad or Good oral biovailability rule
    
    Reference:
        Egan, William J., Kenneth M. Merz, and John J. Baldwin. 
        J Med Chem, 43.21 (2000): 3867-3877.
    
    Rule details:
        0 <= TPSA <= 132
        -1 <= logP <=6
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of Egan's rule
    TPSA = molproperty.CalculateTPSA(mol)
    logP = molproperty.CalculateLogP(mol)
    #Determine whether the molecular match each rule
    atPSA = (0 <= TPSA <= 132)
    alogP = (-1 <= logP <= 6)
    #Give the advice
    if atPSA & alogP:
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violsted rules
    nviolate = 2 - (atPSA + alogP)
    #res
    if detail:
        items = ['tPSA', 'logP', 'Disposed', 'nViolate']
        vals = [TPSA, logP, disposed, nviolate]
    else:
        items = ['Disposed', 'nViolate']
        vals = [disposed, nviolate]

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 7
0
def CheckRo3(mol, detail=False, showSMILES=False):
    """
    Check molecular under Ro3
    
    Ref.:
        Congreve, Miles, et al.
        Drug discovery today 19.8 (2003): 876-877.
        
    Rule details:
        MW <= 300
        -3 <= logP <= 3
        NHD <= 3
        NHA <= 6
        PSA <= 60
        nRot <= 3
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of REOS
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    nHA = molproperty.CalculateNumHAcceptors(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    nRot = molproperty.CalculateNumRotatableBonds(mol)
    #Determine whether the molecular match each rule
    aMW = (MW <= 300)
    alogP = (-3 <= logP <= 3)
    anHD = (nHD <= 3)
    anHA = (nHA <= 6)
    atPSA = (tPSA <= 60)
    aRot = (nRot <= 3)
    #Give the advice
    if (aMW & alogP & anHD & anHA & atPSA & anRot):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 6 - (aMW + alogP + anHD + anHA + atPSA + anRot)
    #res
    if detail:
        items = [
            'MW', 'logP', 'nHD', 'nHA', 'tPSA', 'nRot', 'Disposed', 'nViolate'
        ]
        vals = (MW, logP, nHD, nHA, tPSA, nRot, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 8
0
def CheckREOS(mol, detail=False, showSMILES=False):
    """
    Check molecular under REOS program
    
    Reference:
        Walters, W. Patrick, and Mark Namchuk.
        Nat Rev Drug Discov, 2.4 (2003): 259.
        
    Rule details:
        200 <= MW <= 500
        -5 <= logP <= 5
        nHD <= 5
        nHA <= 10
        nRot <= 8
        TPSA <= 150
        -4 <= fChar <= 4
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of REOS
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    nHA = molproperty.CalculateNumHAcceptors(mol)
    nRot = molproperty.CalculateNumRotatableBonds(mol)
    TPSA = molproperty.CalculateTPSA(mol)
    fChar = molproperty.CalculateMolFCharge(mol)
    #Determine whether the molecular match each rule
    amw = (200 <= MW <= 500)
    alogP = (-5 <= logP <= 5)
    anhd = (nHD <= 5)
    anha = (nHA <= 10)
    anrot = (nRot <= 8)
    atpsa = (TPSA <= 150)
    afchar = (-4 <= fChar <= 4)
    #Give the advice
    if (amw & alogP & anhd & anha & anrot & atpsa & afchar):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 7 - (amw + alogP + anhd + anha + anrot + atpsa + afchar)
    #Res
    if detail:
        items = [
            'MW', 'logP', 'nHD', 'nHA', 'nRot', 'TPSA', 'fChar', 'Disposed',
            'nViolate'
        ]
        vals = (MW, logP, nHD, nHA, nRot, TPSA, fChar, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 9
0
def CheckBeyondRo5(mol, detail=False, showSMILES=False):
    """
    Check molecular under beyond Ro5
    
    Reference:
        Doak, Bradley C., et al.
        journal of medicinal chemistry 59.6 (2015): 2312-2327.
        
    Rule details:
        MW <= 1000
        -2 <= logP <= 10
        nHD <= 6
        nHA <= 15
        PSA <= 250
        nRot <= 20
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of Lipinskin's rule
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHD = molproperty.CalculateNumHDonors(mol)
    nHA = molproperty.CalculateNumHAcceptors(mol)
    PSA = molproperty.CalculateTPSA(mol)
    nRot = molproperty.CalculateNumRotatableBonds(mol)
    #Determine whether the molecular match each rule
    aMW = (MW <= 1000)
    alogP = (-2 <= logP <= 10)
    anHD = (nHD <= 6)
    anHA = (nHA <= 15)
    aPSA = (PSA <= 250)
    aRot = (nRot <= 20)
    #Check whether mol pass the whole rules
    if (aMW & alogP & anHD & anHA & aRot & aPSA):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 6 - (aMW + alogP + anHD + anHA + aRot + aPSA)
    if detail:
        items = [
            'MW', 'logP', 'nHD', 'nHA', 'PSA', 'nRot', 'Disposed', 'nViolate'
        ]
        vals = (MW, logP, nHD, nHA, PSA, nRot, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic
Esempio n. 10
0
def CheckRespiratory(mol, detail=False, showSMILES=False):
    """
    Check mol under Respiratory
    
    Reference:
        Ritchie, Timothy J., Christopher N. Luscombe, and Simon JF Macdonald. 
        J Chem Inf Model, 49.4 (2009): 1025-1032.
        
    Rule details:
        240<=MW<= 520
        -2.0<=logP<=4.7
        6<=nHB<=12
        51<=tPSA<=135
        3<=nRot<=8
        1<=nRing<=5
    
    :param mol: molecule
    :type mol: rdkit.Chem.rdchem.Mol
    :param detail: Control returning specific infomation or not, defaults to False
    :type detail: bool, optional
    :param showSMILES: Control returning SMILES or not, defaults to False
    :type showSMILES: bool, optional
    
    
    :return: Result after scanning. If detail has been set to False, only return 'Disposed' and 'nViolate', otherwise exrta returning each property 
    :rtype: `dict`
    
    """
    #Calculate required properties of REOS
    MW = molproperty.CalculateMolWeight(mol)
    logP = molproperty.CalculateLogP(mol)
    nHB = molproperty.CalculateNumHyBond(mol)
    tPSA = molproperty.CalculateTPSA(mol)
    nRot = molproperty.CalculateNumRotatableBonds(mol)
    nRing = molproperty.CalculateNumRing(mol)
    #Determine whether the molecular match each rule
    aMW = (240 <= MW <= 520)
    alogP = (-0.2 <= logP <= 4.7)
    anHB = (6 <= nHB <= 12)
    atPSA = (51 <= tPSA <= 135)
    anRot = (3 <= nRot <= 8)
    anRing = (1 <= nRing <= 5)
    #Give the advice
    if (aMW & alogP & anHB & atPSA & anRot & anRing):
        disposed = 'Accepted'
    else:
        disposed = 'Rejected'
    #Count the number of violated rules
    nviolate = 6 - (aMW + alogP + anHB + atPSA + anRot + anRing)
    #res
    if detail:
        items = [
            'MW', 'logP', 'nHB', 'tPSA', 'nRot', 'nRing', 'Disposed',
            'nViolate'
        ]
        vals = (MW, logP, nHB, tPSA, nRot, nRing, disposed, nviolate)
    else:
        items = ['Disposed', 'nViolate']
        vals = (disposed, nviolate)

    dic = {'SMILES': Chem.MolToSmiles(mol)} if showSMILES else {}
    dic.update(dict(zip(items, vals)))
    return dic