转载于 https://mp.weixin.qq.com/s/P62sjqhSTxmWVicrEAk-RQ

为了简化展示过程,我们设计了一个pml脚本 (脚本内有很详细的解释),只需要修改脚本里面受体和配体的名字,然后在PyMOL的命令行界面输入PyMOL> run display.pml即可获得展示结果。当然这个脚本也可以使用程序generatePmlForHbond.py生成。

 ############################################################
###All one needs to do is replacing:                        ##
###  * Protein structure file: E:\docking\1hsg_prot.pdb     ##
###  * Protein name: 1hsg                                   ##
###  * Docking result file: E:\docking\indinavir.pdbqt      ##
###  * Docking result name (normally ligand name): indinavir##
############################################################
# The following 4 lines:
   # 1. load protein structure and rename it
   # 2. add hydrogen (`h_add` uses a primitive algorithm to add hydrogens onto a molecule.)
   # 3. hide protein display
   # 4. show cartoon display for protein
load E:\yunpan\docking\1hsg_prot.pdb, 1hsg
h_add 1hsg
hide everything, 1hsg
show cartoon, 1hsg
cmd.spectrum("count", selection="1hsg", byres=1) # The following 6 lines:
   # 1. load ligand structure and rename it
   # 2. add hydrogen
   # 3. hide ligand display
   # 4. show ligand in sticks mode
   # 5. Set width of stick to 0.15
   # 6. Set atom color: C-white;N-blue;O-red
load E:\yunpan\docking\indinavir.pdbqt, indinavir
h_add indinavir
hide everything, indinavir
show sticks, indinavir
set stick_radius, 0.15
util.cbaw indinavir # The following 1 line:
   # 1. Select metal ions
select metals, symbol mg+ca+fe+zn # The following 2 lines:
   # 1. Set hydrogen donator
   # 2. Set hydrogen accrptor
   # `select` creates a named selection from an atom selection.
   # `select name, (selection)`
select h_donator,  (elem n,o and (neighbor hydro))
select h_acceptor, (elem o or (elem n and not (neighbor hydro))) # The following 4 lines:
   # 1. Create link between ligand_h_acceptor and prot_h_donator  within given distance 3.2
   # 2. Create link between ligand_h_donator  and prot_h_acceptor within given distance 3.2
   #    Set filter 3.6 for ideal geometry and filter 3.2 for minimally acceptable geometry
   # 3. Set red color for ligand_h_acceptor and prot_h_donator
   # 4. Set blue color for ligand_h_donator  and prot_h_acceptor
   # `distance` creates a new distance object between two selections. It will display all distances within the cutoff. Distance is also used to make hydrogen bonds like `distance hbonds, all, all, 3.2, mode=2`.
   # distance [ name [, selection1 [, selection2 [, cutoff [, mode ]]]]]
distance LaccPdon, (indinavir and h_acceptor), (1hsg and h_donator), 3.2
distance LdonPacc, (indinavir and h_donator), (1hsg and h_acceptor), 3.2
color red, LaccPdon
color blue, LdonPacc
#distance Fe_C20, (fep and name C20), (heme and name fe)) # The following 6 lines:
   # 1. Select non-hydro atoms of ligands
   # 2. Select protein atoms within 5A of selected atoms in last step
   # 3. Label alpha-c(ca) of selected residues with residue name and residue position
   # 4. Set label color back
   # 5. Set background white
   # 6. Hidden hydrogenes
select sele, indinavir & not hydro
select sele, byres (sele expand 5) & 1hsg
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y',    \
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A',    \
'GLY':'G', 'PRO':'P', 'CYS':'C'}
label name ca & sele, "%s-%s" % (one_letter[resn],resi)
bg white
set label_color, black
hide (hydro) # The follwing 5 lines
   # 1. Comment out this line
   # 2. Create an object `surrounding_res` to represent selected protein atoms
   #    `create`: creates a new molecule object from a selection. It can also be used to create states in an   existing object.
   #    `create name, (selection)`
   # 3. Display created surface
   # 4. Set color for surrounding_res
   # 5. Set transparency for surrounding_res
   #    Transparency is used to adjust the transparency of Surfaces and Slices.    
   #    `set transparency, F, selection`
#show surface, 1hsg
create surrounding_res, sele
show surface, surrounding_res
color grey80, surrounding_res
set transparency, 0.5, surrounding_res

此外还可以使用如下脚本(list_hbonds.py)输出相互作用的原子及其位置。

# Copyright (c) 2010 Robert L. Campbell
from pymol import cmd def list_hb(selection,selection2=None,cutoff=3.2,angle=55,mode=1,hb_list_name='hbonds'):
   """
   USAGE    list_hb selection, [selection2 (default=None)], [cutoff (default=3.2)],
                      [angle (default=55)], [mode (default=1)],
                      [hb_list_name (default='hbonds')]    The script automatically adds a requirement that atoms in the
   selection (and selection2 if used) must be either of the elements N or
   O.    If mode is set to 0 instead of the default value 1, then no angle
   cutoff is used, otherwise the angle cutoff is used and defaults to 55
   degrees.    e.g.
   To get a list of all H-bonds within chain A of an object
     list_hb 1abc & c. a &! r. hoh, cutoff=3.2, hb_list_name=abc-hbonds    To get a list of H-bonds between chain B and everything else:
     list_hb 1tl9 & c. b, 1tl9 &! c. b    """
   cutoff=float(cutoff)
   angle=float(angle)
   mode=float(mode)
   # ensure only N and O atoms are in the selection
   selection = selection + " & e. n+o"
   if not selection2:
       hb = cmd.find_pairs(selection,selection,mode=mode,cutoff=cutoff,angle=angle)
   else:
       selection2 = selection2 + " & e. n+o"
       hb = cmd.find_pairs(selection,selection2,mode=mode,cutoff=cutoff,angle=angle)    # sort the list for easier reading
   hb.sort(lambda x,y:(cmp(x[0][1],y[0][1])))    for pairs in hb:
       cmd.iterate("%s and index %s" % (pairs[0][0],pairs[0][1]), 'print "%1s/%3s`%s/%-4s " % (chain,resn,resi,name),')
       cmd.iterate("%s and index %s" % (pairs[1][0],pairs[1][1]), 'print "%1s/%3s`%s/%-4s " % (chain,resn,resi,name),')
       print "%.2f" % cmd.distance(hb_list_name,"%s and index %s" % (pairs[0][0],pairs[0][1]),"%s and index %s" % (pairs[1][0],pairs[1][1])) #cmd.extend("list_hb",list_hb)
#if __name__ == "__main__":
cmd.load("E:/yunpan/docking/1hsg_prot.pdb", "1hsg")
cmd.h_add("(1hsg)")
cmd.load("E:/yunpan/docking/indinavir.pdbqt","indinavir")
cmd.h_add("(indinavir)") h_donator  = "elem n,o & (neighbor hydro)"
h_acceptor = "elem o | (elem n & !(neighbor hydro))" lacc = "indinavir & (elem o | (elem n & !(neighbor hydro)))"
ldon = "indinavir & (elem n,o & (neighbor hydro))"
pacc = "1hsg & (elem o | (elem n & !(neighbor hydro)))"
pdon = "1hsg & (elem n,o & (neighbor hydro))" list_hb(ldon, pacc, hb_list_name="l2p_hbonds")
list_hb(lacc, pdon, hb_list_name="p2l_hbonds")

输出结果如下:

PyMOL>run E:/docking/list_hbonds.py
B/MK1`902/N4    B/GLY`27/O     3.03
B/MK1`902/O4    B/GLY`27/O     3.16
B/MK1`902/O2    A/ASP`25/OD1   2.77
B/MK1`902/O2    B/ASP`25/OD1   2.63

看上去比显示的氢键少了三个,这是因为我们在第二个函数中使用了H-键角度限制,如果在调用时给定参数list_hb(mode=0)则会获得一致结果。

H-bond结果展示。第一张图为运行display.pml后的结果,蓝色虚线为氢键;第二张图为运行list_hbonds.py后的结果, 黄色虚线为氢键(覆盖了之前的蓝色)。可以通过点选LaccPdonLdonPaccl2p_hbonds显示不同的氢键。

展示疏水表面

# color_h
# ------- # PyMOL command to color protein molecules according to the Eisenberg hydrophobicity scale #
# Source: http://us.expasy.org/tools/pscale/Hphob.Eisenberg.html
# Amino acid scale: Normalized consensus hydrophobicity scale
# Author(s): Eisenberg D., Schwarz E., Komarony M., Wall R.
# Reference: J. Mol. Biol. 179:125-142 (1984)
#
# Amino acid scale values:
#
# Ala:  0.620
# Arg: -2.530
# Asn: -0.780
# Asp: -0.900
# Cys:  0.290
# Gln: -0.850
# Glu: -0.740
# Gly:  0.480
# His: -0.400
# Ile:  1.380
# Leu:  1.060
# Lys: -1.500
# Met:  0.640
# Phe:  1.190
# Pro:  0.120
# Ser: -0.180
# Thr: -0.050
# Trp:  0.810
# Tyr:  0.260
# Val:  1.080
#
# Usage:
# color_h (selection)
#
from pymol import cmd def color_h(selection='all'):
       s = str(selection)
   print s
       cmd.set_color('color_ile',[0.996,0.062,0.062])
       cmd.set_color('color_phe',[0.996,0.109,0.109])
       cmd.set_color('color_val',[0.992,0.156,0.156])
       cmd.set_color('color_leu',[0.992,0.207,0.207])
       cmd.set_color('color_trp',[0.992,0.254,0.254])
       cmd.set_color('color_met',[0.988,0.301,0.301])
       cmd.set_color('color_ala',[0.988,0.348,0.348])
       cmd.set_color('color_gly',[0.984,0.394,0.394])
       cmd.set_color('color_cys',[0.984,0.445,0.445])
       cmd.set_color('color_tyr',[0.984,0.492,0.492])
       cmd.set_color('color_pro',[0.980,0.539,0.539])
       cmd.set_color('color_thr',[0.980,0.586,0.586])
       cmd.set_color('color_ser',[0.980,0.637,0.637])
       cmd.set_color('color_his',[0.977,0.684,0.684])
       cmd.set_color('color_glu',[0.977,0.730,0.730])
       cmd.set_color('color_asn',[0.973,0.777,0.777])
       cmd.set_color('color_gln',[0.973,0.824,0.824])
       cmd.set_color('color_asp',[0.973,0.875,0.875])
       cmd.set_color('color_lys',[0.899,0.922,0.922])
       cmd.set_color('color_arg',[0.899,0.969,0.969])
       cmd.color("color_ile","("+s+" and resn ile)")
       cmd.color("color_phe","("+s+" and resn phe)")
       cmd.color("color_val","("+s+" and resn val)")
       cmd.color("color_leu","("+s+" and resn leu)")
       cmd.color("color_trp","("+s+" and resn trp)")
       cmd.color("color_met","("+s+" and resn met)")
       cmd.color("color_ala","("+s+" and resn ala)")
       cmd.color("color_gly","("+s+" and resn gly)")
       cmd.color("color_cys","("+s+" and resn cys)")
       cmd.color("color_tyr","("+s+" and resn tyr)")
       cmd.color("color_pro","("+s+" and resn pro)")
       cmd.color("color_thr","("+s+" and resn thr)")
       cmd.color("color_ser","("+s+" and resn ser)")
       cmd.color("color_his","("+s+" and resn his)")
       cmd.color("color_glu","("+s+" and resn glu)")
       cmd.color("color_asn","("+s+" and resn asn)")
       cmd.color("color_gln","("+s+" and resn gln)")
       cmd.color("color_asp","("+s+" and resn asp)")
       cmd.color("color_lys","("+s+" and resn lys)")
       cmd.color("color_arg","("+s+" and resn arg)")
cmd.extend('color_h',color_h) def color_h2(selection='all'):
       s = str(selection)
   print s
   cmd.set_color("color_ile2",[0.938,1,0.938])
   cmd.set_color("color_phe2",[0.891,1,0.891])
   cmd.set_color("color_val2",[0.844,1,0.844])
   cmd.set_color("color_leu2",[0.793,1,0.793])
   cmd.set_color("color_trp2",[0.746,1,0.746])
   cmd.set_color("color_met2",[0.699,1,0.699])
   cmd.set_color("color_ala2",[0.652,1,0.652])
   cmd.set_color("color_gly2",[0.606,1,0.606])
   cmd.set_color("color_cys2",[0.555,1,0.555])
   cmd.set_color("color_tyr2",[0.508,1,0.508])
   cmd.set_color("color_pro2",[0.461,1,0.461])
   cmd.set_color("color_thr2",[0.414,1,0.414])
   cmd.set_color("color_ser2",[0.363,1,0.363])
   cmd.set_color("color_his2",[0.316,1,0.316])
   cmd.set_color("color_glu2",[0.27,1,0.27])
   cmd.set_color("color_asn2",[0.223,1,0.223])
   cmd.set_color("color_gln2",[0.176,1,0.176])
   cmd.set_color("color_asp2",[0.125,1,0.125])
   cmd.set_color("color_lys2",[0.078,1,0.078])
   cmd.set_color("color_arg2",[0.031,1,0.031])
       cmd.color("color_ile2","("+s+" and resn ile)")
       cmd.color("color_phe2","("+s+" and resn phe)")
       cmd.color("color_val2","("+s+" and resn val)")
       cmd.color("color_leu2","("+s+" and resn leu)")
       cmd.color("color_trp2","("+s+" and resn trp)")
       cmd.color("color_met2","("+s+" and resn met)")
       cmd.color("color_ala2","("+s+" and resn ala)")
       cmd.color("color_gly2","("+s+" and resn gly)")
       cmd.color("color_cys2","("+s+" and resn cys)")
       cmd.color("color_tyr2","("+s+" and resn tyr)")
       cmd.color("color_pro2","("+s+" and resn pro)")
       cmd.color("color_thr2","("+s+" and resn thr)")
       cmd.color("color_ser2","("+s+" and resn ser)")
       cmd.color("color_his2","("+s+" and resn his)")
       cmd.color("color_glu2","("+s+" and resn glu)")
       cmd.color("color_asn2","("+s+" and resn asn)")
       cmd.color("color_gln2","("+s+" and resn gln)")
       cmd.color("color_asp2","("+s+" and resn asp)")
       cmd.color("color_lys2","("+s+" and resn lys)")
       cmd.color("color_arg2","("+s+" and resn arg)")
cmd.extend('color_h2',color_h2)

将上面的脚本存储为color_h.py,在PyMOL界面运行File-Run-color_h.py,在命令行输入>PyMOl color_hShow surface

用PyMOL展示配体和受体相互作用的原子和氢键的更多相关文章

  1. Docking非原生配体

    转载于 https://mp.weixin.qq.com/s/VDN1qAZGIMol6prwQW4umw Docking非原生配体 在前面的例子中,AutoDock Vina能把配体构象调整到几乎原 ...

  2. Chapter5 生长因子、受体和癌症

    一.Src蛋白是一种蛋白激酶 可以磷酸化不同的底物,调节不同的通路 Src激酶主要磷酸化酪氨酸残基,而别的激酶主要磷酸化色氨酸.苏氨酸残基 二.EGF受体拥有酪氨酸激酶功能 胞内结构域有Src蛋白的同 ...

  3. 单细胞分析实录(18): 基于CellPhoneDB的细胞通讯分析及可视化 (上篇)

    细胞通讯分析可以给我们一些细胞类群之间相互调控/交流的信息,这种细胞之间的调控主要是通过受配体结合,传递信号来实现的.不同的分化.疾病过程,可能存在特异的细胞通讯关系,因此阐明这些通讯关系至关重要. ...

  4. (转)protein 数据库

    最早关注蛋白质互作网络,是在来GDMC第一年的时候,中间停了半年看互作-各种算法,网络分析停滞不前,没想到搞到最后,还是和网络碰到了一起,我总是会潜意识走近给自己第一印象不错的object,包括人.用 ...

  5. 生信云实证Vol.12:王者带飞LeDock!开箱即用&一键定位分子库+全流程自动化,3.5小时完成20万分子对接

    LeDock是苏黎世大学Zhao HongTao在博士期间开发的一款分子对接软件,专为快速准确地将小分子灵活对接到蛋白质而设计.LeDock优于大部分商业软件,在Astex多样性集合上实现了大于90% ...

  6. C基础 如何让代码只执行一次

    1.0 最简单, 最高效的方式 C 代码运行起点 main 就是个大单例函数. 如果把函数注册在其里面, 那么一定很可以 :) // 某个库需要初始化的函数 void log_init(void) { ...

  7. Bader分析

    一.背景 理查德·贝德(Richard Bader)开发了一种将分子分解为原子的直观方法.他对原子的定义纯粹基于电子电荷密度.Bader使用所谓的零磁通表面来划分原子.零通量表面是2D表面,其上电荷密 ...

  8. 基于 HTML5 + WebGL 的太阳系 3D 展示系统

    前言 近年来随着引力波的发现.黑洞照片的拍摄.火星上存在水的证据发现等科学上的突破,以及文学影视作品中诸如<三体>.<流浪地球>.<星际穿越>等的传播普及,宇宙空间 ...

  9. 基于 HTML5 + WebGL 的宇宙 3D 展示系统

    前言 近年来随着引力波的发现.黑洞照片的拍摄.火星上存在水的证据发现等科学上的突破,以及文学影视作品中诸如<三体>.<流浪地球>.<星际穿越>等的传播普及,宇宙空间 ...

随机推荐

  1. 【剑指offer】圆圈中最后剩下的数字(约瑟夫问题),C++实现

    原创博文,转载请注明出处! # 题目 # 思路 本题即为典型的约瑟夫问题,通过递推公式倒推出问题的解.原始问题是从n个人中每隔m个数踢出一个人,原始问题变成从n-1个人中每隔m个数踢出一个人--    ...

  2. 每天一个linux命令(文件操作):【转载】find命令之exec

    find是我们很常用的一个Linux命令,但是我们一般查找出来的并不仅仅是看看而已,还会有进一步的操作,这个时候exec的作用就显现出来了. exec解释: -exec  参数后面跟的是command ...

  3. hadoop2.x常用端口、定义方法及默认端口、hadoop1.X端口对比

    问题导读: 1.DataNode的http服务的端口.ipc服务的端口分别是哪个? 2.NameNode的http服务的端口.ipc服务的端口分别是哪个? 3.journalnode的http服务的端 ...

  4. php excel 读取日期问题

    在 php excel 读取 xls 格式的文件时,xls 上面显示的是正常的日期格式 但是读取出来的话,就会是一个万位整形数据,这显然不是我们想要的日期 读取出来的结果: 41807 $t = 41 ...

  5. Clairewd’s message(哈希模板+)

    个人心得:一开始就是知道用哈希,但是无从下手,很明显是对哈希不太了解和思维不太好. 先来看一下这一题涉及到的哈希吧和这题的思路吧,思路就是对所给的密文用原文和翻译后进行hash处理,那么必然存在后面那 ...

  6. php中strstr、strchr、strrchr、substr、stristr

    一.strstr 和 strcchr的区别 strstr   显示第一次找到,要查找的字符串,以及后面的字符串. strrchr 显示最后一次找到,要查找的字符串,以及后面的字符串. 二.strstr ...

  7. 【DUBBO】 Dubbo内核实现之动态编译

    转载:http://blog.csdn.net/quhongwei_zhanqiu/article/details/41577483 我们运行的java代码,一般都是编译之后的字节码.Dubbo为了实 ...

  8. VS 2013 简体中文 专业版 下载地址。

    官方原始链接:http://download.microsoft.com/download/7/A/C/7AC27F37-FDFE-4991-B18A-962E26E31BD1/VS2013_RTM_ ...

  9. spring boot 使用spring.resources.static-locations 分离系统模版&&资源文件

    方便我们将资源配置以及模版&&静态文件分离出来,而不是打包在一起,比如以下的一个demo 参考配置: server.port=8006 spring.application.name= ...

  10. ballerina 学习三 根据swagger 以及protobuf 生成code

    备注: 基本环境安装就不用介绍了,swagger 以及grpc 同时也不用介绍了,都是比较简单的代码,就是一个简单的测试 1.   初始化项目 ballerina init 项目结构如下: ├── R ...