RDKit | 操作与实践

RDKit|骨架分解与侧链分离

2020-05-21  本文已影响0人  最会设计的科研狗

一、骨架分解

1.Murcko Scaffold

Murcko骨架由Murcko等人设计并用药物的形状、结构分析。他们将药物分子拆解成四种单元:环系结构(ring system)、接头(linker)、骨架(scaffold)、侧链(side chain),其中scaffold又由ring system和linker组成;scaffold和side chain又组成了药物分子。这么分解可以提供以下几点好处:

  1. Scaffold可以为药物的整体设计提供参考
  2. Ring system和linker可以为药化提供合成单元
  3. 可以通过形状的分析,评价分子库的类药程度

Rdkit中也提供了一些用于骨架和侧链分析的工具

>>> from rdkit import Chem
>>> from rdkit.Chem import Draw
>>> from rdkit.Chem.Scaffolds import MurckoScaffold
>>> m = Chem.MolFromSmiles('O=C(NCc1cc(OC)c(O)cc1)Cc1cocc1CC')
>>> core = MurckoScaffold.GetScaffoldForMol(m)
>>> m_core = [m, core]
>>> Draw.MolsToGridImage(m_core, subImgSize=(250, 250))
1
>>> MurckoScaffold.MurckoScaffoldSmilesFromSmiles('O=C(NCc1cc(OC)c(O)cc1)Cc1cocc1CC')
'O=C(Cc1ccoc1)NCc1ccccc1'

2.Generic Framework

将分子以图的形式表示,对结构进行抽象,即所有的原子作为顶点,所有的键作为边,主要反映了原子间的连接属性。

gen_mcore = map(MurckoScaffold.MakeScaffoldGeneric, m_core)
Draw.MolsToGridImage(list(gen_mcore), subImgSize=(250, 250))
2

二、侧链分离

1.rdRGroupDecomposition

>>> from rdkit.Chem import rdRGroupDecomposition as rdRGD
>>> suppl = Chem.SmilesMolSupplier('F:\\Anaconda3_2019_10\\Library\\share\\RDKit\\Docs\\Book\\data\\s1p_chembldoc89753.txt', delimiter=",", smilesColumn=9, nameColumn=10)
>>> ms = [x for x in suppl if x]
>>> core = Chem.MolFromSmarts('[*:1]c1nc([*:2])on1')
>>> core
3
>>> res, unmatched = rdRGD.RGroupDecompose([core], ms, asSmiles=True)
>>> print(len(res), len(unmatched))
>>> res[0]
40 0
{'Core': 'n1oc([*:2])nc1[*:1]',
 'R1': 'O=C(O)CCCC1NCCOc2c1cccc2[*:1]',
 'R2': 'CC(C)Oc1ccc([*:2])cc1Cl'}
>>> Chem.Draw.MolsToGridImage([ms[0], Chem.MolFromSmiles(res[0]['R1']), Chem.MolFromSmiles(res[0]['R2'])], molsPerRow=3, subImgSize=(300, 300))
4
>>> import pandas as pd
>>> df = pd.DataFrame(res)
>>> df.head()
    Core    R1  R2
0   n1oc([*:2])nc1[*:1] O=C(O)CCCC1NCCOc2c1cccc2[*:1]   CC(C)Oc1ccc([*:2])cc1Cl
1   n1oc([*:2])nc1[*:1] O=C(O)CCC1NCCOc2c1cccc2[*:1]    CC(C)Oc1ccc([*:2])cc1Cl
2   n1oc([*:2])nc1[*:1] O=C(O)CCC1COc2ccc([*:1])cc2CN1  CC(C)Oc1ccc([*:2])cc1Cl
3   n1oc([*:2])nc1[*:1] O=C(O)CCCC1NCCOc2c1cccc2[*:1]   CC(C)Oc1ncc([*:2])cc1Cl
4   n1oc([*:2])nc1[*:1] O=C(O)CCCC1NCCOc2c1cccc2[*:1]   CC(C)Oc1ncc([*:2])cc1Cl

2.ReplaceCore

除了上述方法,还可以通过Chem.ReplaceCore分离侧链

core = Chem.MolFromSmiles('n1cnoc1')
ms[0].HasSubstructMatch(core)
True
rs = Chem.ReplaceCore(ms[0], core)
Chem.MolToSmiles(rs)
'[1*]c1cccc2c1OCCNC2CCCC(=O)O.[2*]c1ccc(OC(C)C)c(Cl)c1'
rs = Chem.ReplaceCore(ms[0], core, labelByIndex=True)
Chem.MolToSmiles(rs)
'[1*]c1cccc2c1OCCNC2CCCC(=O)O.[4*]c1ccc(OC(C)C)c(Cl)c1'
res = Chem.GetMolFrags(rs, asMols=True)
Chem.MolToSmiles(res[0])
'[4*]c1ccc(OC(C)C)c(Cl)c1'

本文参考自rdkit官方文档
代码及源文件在这里

上一篇下一篇

猜你喜欢

热点阅读