生物分子模拟论坛

 找回密码
 我想注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 4041|回复: 1

[Pymol] 借助pymol指定氢键规则自动过滤化合物

[复制链接]
发表于 2013-9-27 15:49:22 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,下载更多分子模拟资源。

您需要 登录 才可以下载或查看,没有帐号?我想注册

x
背景:药物虚拟筛选之后,根据构象挑选化合物。
比如晶体结构表明,抑制剂一定会和那几个氨基酸残基发生氢键作用。
我们就可以把这个作为筛选的规则。
借助于脚本可以节省时间,缩小工作量。
说明:
这里提供的是单个大分子和配体的处理,
如果有需要的话,我后面会给出批量处理的脚本。或者自己写个循环。
我目前不知道怎么把命令行的参数传到脚本中,有谁知道的话请联系我。
脚本:hbond.py
==============================
#744891290@qq.com
#author: Zhaoqiang Chen
#Function:find hbonds between ligands and receptor
#Usage: pymol -rkqc showbonds.py
#reference: QUEEN University list_hbonds.py
from pymol import cmd
cmd.fetch('1tl9')
#cmd.remove('solvent')
selection="1tl9 & resn AR7"  #AR7 is the ligand
selection2="1tl9 & c. a &! resn HOH" #the chain a in protein ,don't include waters

#chain a == c. a
#chain a !=c.a  #!!!! because '.' in  the python is very important (object and method)
hb=cmd.find_pairs(selection,selection2,mode=1,cutoff=3.2,angle=55)
#when mode=0 the angle and cutoff is no limit
#

for pairs in hb:
#print pairs[0][0]," ",pairs[0][1]," ",pairs[1][0],"  ",pairs[1][1]
        #m1=[]
#cmd.iterate("%s and index %s"%(pairs[0][0] ,pairs[0][1]),'m1.append("%s%1s/%3s %s/%-4s"%(model,chain,resn,resi,name))')
cmd.iterate("%s and index %s"%(pairs[0][0] ,pairs[0][1]),'print "%s%1s/%3s %s/%-4s"%(model,chain,resn,resi,name),') #there is a port to stor information by m1.append
cmd.iterate("%s and index %s"%(pairs[1][0] ,pairs[1][1]),'print "%s%1s/%3s %s/%-4s"%(model,chain,resn,resi,name),')
#print m1,m1,m1

print cmd.distance("%s and index %s" %(pairs[0][0],pairs[0][1]), "%s and index %s" %(pairs[1][0],pairs[1][1]))  
#line="distance "+pairs[0][0]+" and index "+str(pairs[0][1])+","+pairs[1][0]+" and index "+str(pairs[1][1])
#line2=pairs[0][0]+" and index "+str(pairs[0][1])+","+pairs[1][0]+" and index "+str(pairs[1][1])

#print line
#print cmd.do(line)
#print cmd.distance(line2)




==============================

执行方法:pymol -c hbond.py
如果在使用过程遇到问题可以联系我: 744891290@qq.com


======
如果有需要的话,我后面会给出批量处理的脚本。或者自己写个循环。
我目前不知道怎么把命令行的参数传到脚本中,有谁知道的话请联系我。
无意中发现 pymol -pc 可以彻底进入pymol的命令行,quit退出
发表于 2013-9-28 21:15:52 | 显示全部楼层
顶一个{:soso_e102:}
您需要登录后才可以回帖 登录 | 我想注册

本版积分规则

QQ|分迪科技|小黑屋|手机版|Archiver|生物分子模拟论坛 ( 蜀ICP备14009200号-3 )

GMT+8, 2024-4-27 05:52 , Processed in 0.063364 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表