Autodock vina批量分子对接(虚拟筛选)

资料来源

首选看这个,可以跟着手操一波小分子的下载和软件的使用(主要录制的比较好)
【虚拟筛选】使用Autodock_vina进行批量分子对接_哔哩哔哩_bilibili

但是接着就要看这个(上面那个不是很全),这个大佬最详细(蛋白的处理看这个
小分子虚拟筛选与分子模拟课程——4.批量小分子对接_哔哩哔哩_bilibili

基础知识:比如为何需要pdbqt格式
分子对接基础知识 - xiaojikuaipao - 博客园 (cnblogs.com)

安装的指导文件看下面这些

vina的指导文档,必看(提供了好几种安装方式,一种不行换一种,其实操作非常详细了,很多都不一定需要手动调整,直接Linux里面用就行)
Installation — Autodock Vina 1.2.0 documentation (autodock-vina.readthedocs.io)
vina的指导pdf
https://autodock-vina.readthedocs.io/_/downloads/en/latest/pdf/

Open Babel的安装
Open Babel的安装与使用 - 云+社区 - 腾讯云 (tencent.com)

一,蛋白的下载和处理

1. PDB文件内容

文献搜索,或者网站中找,但老实说它的搜索功能有点奇怪,有时候不同关键词(但是应该指向的是一种东西)不同结果
RCSB PDB: Homepage

2.PDB文件的处理

2.1 去除原有小分子ligand+加氢(polar)+导出为pdbqt文件

Discover_studio
【八分熟肉】【分子对接】使用Discovery_studio进行分子对接前蛋白质预处理_哔哩哔哩_bilibili

或者pymol 处理

还要安装windows版本的MGLtools,主要是为了导出pdbqt文件,操作如下

image.png

3.对接的口袋哪里找

用这个网站预测,然后下载活性区域
Zentrum für Bioinformatik: Universität Hamburg - Proteins Plus Server

4.使用autodocktools进行活性口袋的预测,得到配置文件config.txt

receptor=
ligand=

center_x=100.657
center_y=6.351
center_z=40.898

size_x=46
size_y=34
size_z=28

exhaustiveness=16
num_modes=9
energy_range=4

二,软件的安装

vina 和openbabel的安装

2.11 vina的conda和pip安装

这里注意要是python3.7的环境,因为最新版本已经到10了,所以如果直接安装python3的话,会装到python3.10,会有报错

conda create -n vina2 python=3.7
conda activate vina2
pip install -U numpy vina

但是奇葩的是虽然安装上,但是输入vina是没有办法调用的,不知道什么原因,但是好在官网提供了其他方式,直接下载即可用
Installation — Autodock Vina 1.2.0 documentation (autodock-vina.readthedocs.io)

2.12 vina的直接使用

Releases · ccsb-scripps/AutoDock-Vina (github.com)

注意要给权限

chmod 755 vina_1.2.3_linux_x86_64

调用出结果即可

./vina_1.2.0_linux_x86_64 --help

## 或者使用绝对路径

2.13 官网下载vina(最佳方式,推荐)

使用了半天才发现,官网这个下载才是最佳的,Linux下载解压之后,里面还有一个叫vina_split的脚本,这个很重要,因为如果你从zinc上下载的是pdbqt格式的话,下载的pbdqt格式是一个整体,需要用这个软件去分割
Download AutoDock4 – AutoDock (scripps.edu)

2.13 openbabel

用来解压mol文件,因为我们从zinc数据库下载的是一个mol2的压缩文件,要用这个进行解压

conda install -y openbabel  ## 用来解压mol文件
###常用分子格式转换命令,和上下文其实关系不大,属于后来补充的一些操作方法
mol2格式转pdbqt格式:
obabel -imol2 ligand.mol2 -opdbqt -O ligand.pdbqt

pdb格式转mol2格式:
obabel -ipdb ligand.pdb -omol2 ligand.mol2

smiles格式转2D的sdf格式:
obabel ligands.smi -O ligands.sdf –gen2d

smiles格式转3D的sdf格式:
obabel ligands.smi -O ligands.sdf –gen3d

sdf格式转smiles格式,删除氢:
obabel ligands.sdf -osmi -O ligands.smi -d

sdf格式转smiles格式,添加氢:
obabel ligands.sdf -O ligands.smi -h

2.2 MGLTools的安装

用来将mol2转换为pdbqt文件,注意看下面的这个教程的操作

直接下载,然后解压即可,需要用到其中的prepare_ligand4.py

Downloads – mgltools (scripps.edu)

Linux上安装MGLtools - 知乎 (zhihu.com)

bash $MGL_ROOT/install.sh

!后面会出现install.sh后面会出现几个alias,要将其放入.bashrc,还要source一下

这个软件因为是python2写的,所以注意需要用到python2的环境,所以按照上面的教程设置2也行,或者直接创建conda的python2的环境

 conda create -n vina3 python=2.7

三, zinc小分子数据库的下载

如何从ZINC数库(www.zinc15.docking.org)下载虚拟筛选化合物库 - 知乎 (zhihu.com)

按照第一个视频上面的操作就好,我们下载的是mol2格式,通过fda认证的小分子药物
ZINC (docking.org)

四.基础操作

4.1 obabel解压缩

首先我们下载的是一个fda.mol2文件,这是个大的压缩文件,要使用obabel 进行解压缩成若干个小的mol2文件

obabel -i mol2 fda.mol2 -o mol2 -O fda.mol2 -m

注:其实看上面就知道其实不需要prepare这个obabel 也可以将mol2转换为pdbqt

4.2 使用MGLTools中的小工具循环将mol2文件转换为pdbqt文件

 for i in *mol2;do echo $i; pythonsh ~/Biosfot/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/AutoDockTools/Utilities24/prepare_ligand4.py  -l $i $i.pdbqt ;done

4.3 进行分子对接

因为我使用的是不需要安装的vina,也就是GitHub下载的版本,这个版本又和视频之中的不一样,会少了一个log选项,所以你如果是按照视频之中的安装,那么分子对接的命令和我是不一致的,help一下命令,看看参数

AutoDock Vina v1.2.3

Input:
  --receptor arg             rigid part of the receptor (PDBQT)
  --flex arg                 flexible side chains, if any (PDBQT)
  --ligand arg               ligand (PDBQT)
  --batch arg                batch ligand (PDBQT)
  --scoring arg (=vina)      scoring function (ad4, vina or vinardo)

Search space (required):
  --maps arg                 affinity maps for the autodock4.2 (ad4) or vina
                             scoring function
  --center_x arg             X coordinate of the center (Angstrom)
  --center_y arg             Y coordinate of the center (Angstrom)
  --center_z arg             Z coordinate of the center (Angstrom)
  --size_x arg               size in the X dimension (Angstrom)
  --size_y arg               size in the Y dimension (Angstrom)
  --size_z arg               size in the Z dimension (Angstrom)
  --autobox                  set maps dimensions based on input ligand(s) (for
                             --score_only and --local_only)

Output (optional):
  --out arg                  output models (PDBQT), the default is chosen based
                             on the ligand file name
  --dir arg                  output directory for batch mode
  --write_maps arg           output filename (directory + prefix name) for
                             maps. Option --force_even_voxels may be needed to
                             comply with .map format

Misc (optional):
  --cpu arg (=0)             the number of CPUs to use (the default is to try
                             to detect the number of CPUs or, failing that, use
                             1)
  --seed arg (=0)            explicit random seed
  --exhaustiveness arg (=8)  exhaustiveness of the global search (roughly
                             proportional to time): 1+
  --max_evals arg (=0)       number of evaluations in each MC run (if zero,
                             which is the default, the number of MC steps is
                             based on heuristics)
  --num_modes arg (=9)       maximum number of binding modes to generate
  --min_rmsd arg (=1)        minimum RMSD between output poses
  --energy_range arg (=3)    maximum energy difference between the best binding
                             mode and the worst one displayed (kcal/mol)
  --spacing arg (=0.375)     grid spacing (Angstrom)
  --verbosity arg (=1)       verbosity (0=no output, 1=normal, 2=verbose)

Configuration file (optional):
  --config arg               the above options can be put here

Information (optional):
  --help                     display usage summary
  --help_advanced            display usage summary with advanced options
  --version                  display program version


先简单测试一波一个分子能不能操作

./vina_1.2.3_linux_x86_64 --config config.txt --ligand fda666.pdbqt --out test/666.pdbqt

可以,那么循环操作就可以了

for i in *pdbqt;do ./vina_1.2.3_linux_x86_64 --config config.txt --ligand $i --out test/$i.log ;done

不过很明显从参数来看vina 1.2版本以上是内置了使用cpu并行运算的,一次搞n个分子

但直接使用Linux和python的并行操作也可以

补充:vina可以在python中使用的脚本

Python scripting — Autodock Vina 1.2.0 documentation (autodock-vina.readthedocs.io)

#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# My first example with AutoDock Vina in python
#

from vina import Vina


v = Vina(sf_name='vina')

v.set_receptor('1iep_receptor.pdbqt')

v.set_ligand_from_file('1iep_ligand.pdbqt')
v.compute_vina_maps(center=[15.190, 53.903, 16.917], box_size=[20, 20, 20])

# Score the current pose
energy = v.score()
print('Score before minimization: %.3f (kcal/mol)' % energy[0])

# Minimized locally the current pose
energy_minimized = v.optimize()
print('Score after minimization : %.3f (kcal/mol)' % energy_minimized[0])
v.write_pose('1iep_ligand_minimized.pdbqt', overwrite=True)

# Dock the ligand
v.dock(exhaustiveness=32, n_poses=20)
v.write_poses('1iep_ligand_vina_out.pdbqt', n_poses=5, overwrite=True)

之后还有分子动力学模拟,之前看过一篇文献叫Beware of docking!
,大概意思就是docking只能提供一个切面,分子动力学模拟比较可靠一点。所以如果想要深入的话,可以以分子对接作为筛选,筛选前面几个分子然后去做分子动力学模拟。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,902评论 5 468
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 84,037评论 2 377
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,978评论 0 332
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,867评论 1 272
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,763评论 5 360
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,104评论 1 277
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,565评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,236评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,379评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,313评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,363评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,034评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,637评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,719评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,952评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,371评论 2 346
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,948评论 2 341

推荐阅读更多精彩内容