我知道如何使用BioPython (which is very easy)遍历蛋白质链中的结构、模型、链、残基和原子。
我如何通过遍历来识别链中的给体和受体原子?
发布于 2021-11-18 00:03:43
gues Matteo很忙,所以我在这里尝试使用
供体-受体距离和供体-受体-受体前行角( ^H)
来自https://www.sciencedirect.com/science/article/pii/S2665928X20300246:肽键平面性约束氢键几何形状并影响二级结构构象
不确定代码是正确的,特别是H角计算,这可能也不是最快的方法,但尽管如此:
使用https://www.rcsb.org/structure/16PK中的16pk.pdb作为输入.pdb文件
我的代码是从How can I get a list of neighboring Hydrogen atoms of an alpha-carbon?复制的
import numpy as np
from Bio.PDB import Chain, Atom, NeighborSearch, PDBParser, Selection
def Hangle(ac: "C atom.coord" ,bc : " O atom.coord" ,cc: "N atom.coord") -> "H_angle" :
"""
https://www.sciencedirect.com/science/article/pii/S2665928X20300246
Peptide bond planarity constrains hydrogen bond geometry and influences secondary structure conformations
and https://stackoverflow.com/questions/35176451/python-code-to-calculate-angle-between-three-point-using-their-3d-coordinates
Parameters
----------
a : "C atom.coord"
DESCRIPTION.
b : " O atom.coord"
DESCRIPTION.
c : "N atom.coord"
DESCRIPTION.
Returns
-------
TYPE
DESCRIPTION.
"""
a = np.array(ac)
b = np.array(bc)
c = np.array(cc)
ba = a - b
bc = c - b
cosine_angle = np.dot(ba, bc) / (np.linalg.norm(ba) * np.linalg.norm(bc))
angle = np.arccos(cosine_angle)
return np.degrees(angle)
def get_putative_acceptors_list(n_donor_atom: Atom.Atom, po):
ns = NeighborSearch(po)
return [h for h in ns.search( n_donor_atom.get_coord(), 3.3, 'A') if h.element == 'O']
p = PDBParser()
structure = p.get_structure('16pk', '16pk.pdb')
n_donor_list = [atom for atom in structure.get_atoms() if atom.name == "N"]
po = Selection.unfold_entities(structure, 'A')
acceptor_list = []
water = 0
for n in range(len(n_donor_list)):
o = get_putative_acceptors_list(n_donor_list[n], po)
for i in o:
if i.get_parent().resname == 'HOH':
water +=1
# print('water', water)
continue
if i.name != 'O':
# print(type(i))
# # print(dir(i.get_parent()))
# print(i, i.get_parent().resname, i.get_parent().id[1])
continue
else:
if i.get_parent().id[1] != n_donor_list[n].get_parent().id[1]-1:
if i.get_parent().id[1] != n_donor_list[n].get_parent().id[1]:
# if i.get_parent().id[1] == n_donor_list[n].get_parent().id[1]-3: #catches alpha elics ???
dist = np.linalg.norm(n_donor_list[n].coord - i.coord)
h_angle = Hangle(i.get_parent()['C'].coord, i.coord, n_donor_list[n].coord )
if 99 < h_angle < 156:
acceptor_list.append((n_donor_list[n], n_donor_list[n].get_parent().resname,n_donor_list[n].get_parent().id[1],
i, i.get_parent().resname, i.get_parent().id[1], dist,
i.serial_number, i.get_parent()['C'], i.get_parent()['C'].serial_number, h_angle))
for i in acceptor_list:
print(i)
print('water', water) 记住https://proteopedia.org/wiki/index.php/Hydrogen_bonds的精细指纹,我得到了主链O(来自C=O)和N(假定的施主)之间假定的H键的这种输出。
.....
(<Atom N>, 'GLU', 403, <Atom O>, 'ALA', 400, 3.247074, 3024, <Atom C>, 3023, 106.052284)
(<Atom N>, 'LEU', 404, <Atom O>, 'SER', 401, 3.2268648, 3029, <Atom C>, 3028, 109.48323)
(<Atom N>, 'LEU', 404, <Atom O>, 'ALA', 400, 3.1475434, 3024, <Atom C>, 3023, 154.70815)
(<Atom N>, 'LEU', 405, <Atom O>, 'LEU', 402, 3.0635853, 3035, <Atom C>, 3034, 112.344406)
(<Atom N>, 'GLU', 406, <Atom O>, 'GLU', 403, 3.075921, 3043, <Atom C>, 3042, 105.97161)
(<Atom N>, 'GLY', 407, <Atom O>, 'LEU', 404, 2.9155347, 3052, <Atom C>, 3051, 115.01412)
(<Atom N>, 'LYS', 408, <Atom O>, 'GLU', 403, 3.044416, 3043, <Atom C>, 3042, 152.44513)
....https://stackoverflow.com/questions/69738224
复制相似问题