pMapper:3D药效团散列和指纹

pmapper的Python项目详细描述


Pmapper-三维药效团特征和指纹

pmapper是一个python模块,用于生成3d药效团签名和指纹。 特征码用适合快速识别相同药效团的散列编码3d药效团。

依赖性

rdkit >= 2017.09
networkx >= 1.11

安装

pip install pmapper

示例

加载模块

frompmapper.pharmacophoreimportPharmacophoreasPfromrdkitimportChemfromrdkit.ChemimportAllChemfrompprintimportpprint

使用默认特征定义从单个符合者创建药效团

# load a molecule from SMILES and generate 3D coordinatesmol=Chem.MolFromSmiles('C1CC(=O)NC(=O)C1N2C(=O)C3=CC=CC=C3C2=O')# talidomidemol=Chem.AddHs(mol)AllChem.EmbedMolecule(mol,randomSeed=42)# create pharmacophorep=P()p.load_from_mol(mol)

获取三维药效团特征

# get 3D pharmacophore signaturesig=p.get_signature_md5()print(sig)

输出:

98504647beeb143ae50bb6b7798ca0f0

获得非零耐受性

的三维药效团特征
sig=p.get_signature_md5(tol=5)print(sig)

输出:

bc54806ba01bf59736a7b62b017d6e1d

为一种多构象化合物创建药效团

frompmapper.utilsimportload_multi_conf_mol# create multiple conformer moleculeAllChem.EmbedMultipleConfs(mol,numConfs=10,randomSeed=1024)ps=load_multi_conf_mol(mol)sig=[p.get_signature_md5()forpinps]pprint(sig)# identical signatures occur

输出:

['d5f5f9d65e39cb8605f1fa9db5b2fbb0',
 '6204791002d1e343b2bde323149fa780',
 'abfabd8a4fcf5719ed6bf2c71a60852c',
 'dfe9f17d30210cb94b8dd7acf77feae9',
 'abfabd8a4fcf5719ed6bf2c71a60852c',
 'e739fb5f9985ce0c65a16da41da4a33f',
 '2297ddf0e437b7fc32077f75e3924dcd',
 'e739fb5f9985ce0c65a16da41da4a33f',
 '182a00bd9057abd0c455947d9cfa457c',
 '68f226d474808e60ab1256245f64c2b7']

相同的散列应该对应于低rmsd的药效团。药效团2和4具有相同的hash abfabd8a4fcf5719ed6bf2c71a60852c。让我们检查一下RMSD。

frompmapper.utilsimportget_rmsforiinrange(len(ps)):print("rmsd bewteen 2 and %i pharmacophore:"%i,round(get_rms(ps[2],ps[i]),2))

输出

rmsd bewteen 2 and 0 pharmacophore: 0.63
rmsd bewteen 2 and 1 pharmacophore: 0.99
rmsd bewteen 2 and 2 pharmacophore: 0.0
rmsd bewteen 2 and 3 pharmacophore: 0.41
rmsd bewteen 2 and 4 pharmacophore: 0.18
rmsd bewteen 2 and 5 pharmacophore: 0.19
rmsd bewteen 2 and 6 pharmacophore: 1.15
rmsd bewteen 2 and 7 pharmacophore: 0.32
rmsd bewteen 2 and 8 pharmacophore: 0.69
rmsd bewteen 2 and 9 pharmacophore: 0.36

他们确实有rmsd<;binning步骤(默认为1a)。然而,其他具有不同散列的药效团的rmsd也低至2。相同的散列保证了相应药效团之间的低rmsd,但反之亦然。

药效团匹配

创建一个两点药效团模型并与一个分子的药效团相匹配(两个药效团应具有相同的装箱步骤)

q=P()q.load_from_feature_coords([('a',(3.17,-0.23,0.24)),('D',(-2.51,-1.28,-1.14))])p.fit_model(q)

输出

(0, 1)

如果它们不匹配None将返回

生成三维药效团指纹

# generate 3D pharmacophore fingerprint which takes into account stereoconfigurationb=p.get_fp(min_features=4,max_features=4)# set of activated bitsprint(b)

输出(一组激活的位号):

{259, 1671, 521, 143, 912, 402, 278, 406, 1562, 1692, 1835, 173, 558, 1070, 942, 1202, 1845, 823, 1476, 197, 968, 1355, 845, 1741, 1364, 87, 1881, 987, 1515, 378, 628, 1141, 1401, 1146, 2043}

更改设置:

b=p.get_fp(min_features=4,max_features=4,nbits=4096,activate_bits=2)print(b)

输出(一组激活的位号):

{389, 518, 2821, 1416, 2952, 395, 3339, 511, 3342, 1937, 1042, 2710, 1817, 1690, 3482, 3737, 286, 1824, 1700, 804, 1318, 2729, 3114, 812, 556, 175, 3763, 2356, 3124, 1077, 1975, 3384, 1081, 185, 65, 1223, 713, 1356, 1998, 1487, 2131, 85, 3670, 1877, 3030, 2395, 1116, 2141, 1885, 347, 2404, 1382, 1257, 3049, 2795, 3691, 2541, 1646, 2283, 241, 113, 3698, 756, 2548, 4086, 2293, 1528, 2802, 127}

保存/加载药效团

p.save_to_pma('filename.pma')

输出是一个json格式的文本文件。

p=P()p.load_from_pma('filename.pma')

支持其他格式

药效团可以从ligandscout pml文件中保存/加载。也可以从xyz文件中读取药效团。

缓存

可以使用enabledcache参数创建药效团。这将加速所有进一步的重复调用,以检索散列、指纹或描述符。

p=P(cache=True)

速度测试

生成药效团特征码(hash)是一项受cpu限制的任务。计算速度取决于药效团中特征的数量。
对500种化合物(药房银行的一个随机子集)进行了测试。每种化合物最多产生50个构象。从25000个药效团中随机选择100个具有特定数量特征的药效团来产生药效团特征。缓存已禁用,但启用的缓存不会影响第一次函数调用的计算时间。
笔记本电脑配置:

  • 英特尔(R)酷睿(TM)i7-5500U CPU@2.40GHz
  • 12 GB内存
  • 计算是在一个线程中运行的(模块是线程安全的,计算可以并行化)
pharmacophore generation: 19.21 s
total number of pharmacophores: 25000

pharmacophore hash generation:
50 pharmacophores having 2 features: 0.00 s; time per pharmacophore: 0.00000 s
100 pharmacophores having 3 features: 0.01 s; time per pharmacophore: 0.00010 s
100 pharmacophores having 4 features: 0.01 s; time per pharmacophore: 0.00010 s
100 pharmacophores having 5 features: 0.04 s; time per pharmacophore: 0.00040 s
100 pharmacophores having 6 features: 0.12 s; time per pharmacophore: 0.00120 s
100 pharmacophores having 7 features: 0.24 s; time per pharmacophore: 0.00240 s
100 pharmacophores having 8 features: 0.51 s; time per pharmacophore: 0.00510 s
100 pharmacophores having 9 features: 0.94 s; time per pharmacophore: 0.00940 s
100 pharmacophores having 10 features: 1.86 s; time per pharmacophore: 0.01860 s
100 pharmacophores having 11 features: 3.02 s; time per pharmacophore: 0.03020 s
100 pharmacophores having 12 features: 4.17 s; time per pharmacophore: 0.04170 s
100 pharmacophores having 13 features: 7.04 s; time per pharmacophore: 0.07040 s
100 pharmacophores having 14 features: 9.29 s; time per pharmacophore: 0.09290 s
100 pharmacophores having 15 features: 12.94 s; time per pharmacophore: 0.12940 s
100 pharmacophores having 16 features: 17.79 s; time per pharmacophore: 0.17790 s
100 pharmacophores having 17 features: 23.58 s; time per pharmacophore: 0.23580 s
100 pharmacophores having 18 features: 33.83 s; time per pharmacophore: 0.33830 s
100 pharmacophores having 19 features: 40.43 s; time per pharmacophore: 0.40430 s
100 pharmacophores having 20 features: 58.30 s; time per pharmacophore: 0.58300 s

文档

模式文档可以在这里找到-https://pmapper.readthedocs.io/en/latest/

引文

基于配体的药效团模型,使用新的三维药效团特征
Alina Kutlushina、Aigul Khakimova、Timur Madzhidov、Pavel Polishchuk
分子2018,23(12),3094
https://doi.org/10.3390/molecules23123094

许可证

BSD-3条款

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将字符串拆分为带关键字的部分   删除数据库后未指定java数据源问题“url”属性   网络化java多人游戏连接   Java当新字符串等于旧字符串时,为什么substring()不创建新对象?   一个实例到多个bean的java注入   JavaSpringMVC验证错误消息   java总结if语句,并从另一个对象(如字符串[])读取if条件(动态if)   需要多个输入的Java IF语句   jsf如何选择正确的bean范围?   java将数据库值加载到组合框JSP,Hibernate   一次活动中的java 3布局   团队和球员反对Java的困难   java ActionListener如何知道按下了哪个按钮?