转载于 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 selec