我知道如何使用bioppython遍历蛋白质链中的结构、模型、链、残基和原子(这非常简单)。
如何通过遍历来识别链中的供体和受体原子?
我猜Matteo很忙,所以我在这里尝试使用
供体-受体距离和施体-受体-受体先行角(^H)
from https://www.sciencedirect.com/science/article/pii/S2665928X20300246:肽键平面度约束氢键几何形状并影响二级结构构象
不确定代码是否正确,特别是H角的计算,这可能不是最快的方法,但无论如何:
使用.pdb文件16pk.pdb
from https://www.rcsb.org/structure/16PK
和我的代码复制从我怎么能得到一个相邻的氢原子的碳的列表?:
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(假设的供体)之间的推定氢键,我得到了这种输出
.....
(<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)
....