Hi, Pymol Users,
Would anyone help me how to count the salt bridges in all models?
After my script, I have the salt bridge list for each model. I would like to
know all the possible salt bridges in all models, and their frequency of each
salt bridge in all the models.
for example,
/A/ASP/446/OD2 to /A/LYS/239/NZ: 3.776 exist in both models, while
A/GLU/328/OE1 to/A/ARG/322/NE: 2.377 exist in only one model.
I have total 50 models. I cannot image a manual way to isolate each salt bridge
and count their frequency in 50 models.
My wild guess is that text processing might solve this issue.
Any suggestions?
Thanks!
The output of model00000 is as follows
model00000/A/GLU/328/OE1 to model00000/A/ARG/322/NE: 2.377
model00000/A/GLU/430/OE2 to model00000/A/ARG/368/NE: 3.883
model00000/A/ASP/446/OD1 to model00000/A/LYS/239/NZ: 2.818
model00000/A/ASP/446/OD2 to model00000/A/LYS/239/NZ: 3.877
model00000/B/GLU/328/OE1 to model00000/B/ARG/322/NE: 2.376
model00000/B/GLU/430/OE2 to model00000/B/ARG/368/NE: 3.884
model00000/B/ASP/446/OD1 to model00000/B/LYS/239/NZ: 2.818
model00000/B/ASP/446/OD2 to model00000/B/LYS/239/NZ: 3.877
model00000/C/GLU/328/OE1 to model00000/C/ARG/322/NE: 2.377
model00000/C/GLU/430/OE2 to model00000/C/ARG/368/NE: 3.883
model00000/C/ASP/446/OD1 to model00000/C/LYS/239/NZ: 2.818
model00000/C/ASP/446/OD2 to model00000/C/LYS/239/NZ: 3.876
model00000/D/GLU/328/OE1 to model00000/D/ARG/322/NE: 2.377
model00000/D/GLU/430/OE2 to model00000/D/ARG/368/NE: 3.883
model00000/D/ASP/446/OD1 to model00000/D/LYS/239/NZ: 2.819
model00000/D/ASP/446/OD2 to model00000/D/LYS/239/NZ: 3.876
model00000/E/GLU/328/OE1 to model00000/E/ARG/322/NE: 2.378
model00000/E/GLU/430/OE2 to model00000/E/ARG/368/NE: 3.883
model00000/E/ASP/446/OD1 to model00000/E/LYS/239/NZ: 2.819
model00000/E/ASP/446/OD2 to model00000/E/LYS/239/NZ: 3.877
The output of model00001 is as follows
model00001/A/ASP/429/OD1 to model00001/B/ARG/424/NE: 2.634
model00001/A/ASP/429/OD2 to model00001/B/ARG/424/NE: 3.672
model00001/A/GLU/437/OE2 to model00001/A/ARG/310/NE: 3.310
model00001/A/ASP/446/OD2 to model00001/A/LYS/239/NZ: 3.776
model00001/B/ASP/429/OD1 to model00001/C/ARG/424/NE: 2.600
model00001/B/ASP/429/OD2 to model00001/C/ARG/424/NE: 3.629
model00001/B/GLU/437/OE2 to model00001/B/ARG/310/NE: 3.311
model00001/B/ASP/446/OD2 to model00001/B/LYS/239/NZ: 3.777
model00001/C/ASP/429/OD1 to model00001/D/ARG/424/NE: 2.597
model00001/C/ASP/429/OD2 to model00001/D/ARG/424/NE: 3.621
model00001/C/GLU/437/OE2 to model00001/C/ARG/310/NE: 3.311
model00001/C/ASP/446/OD2 to model00001/C/LYS/239/NZ: 3.776
model00001/D/ASP/429/OD1 to model00001/E/ARG/424/NE: 2.574
model00001/D/ASP/429/OD2 to model00001/E/ARG/424/NE: 3.604
model00001/D/GLU/437/OE2 to model00001/D/ARG/310/NE: 3.310
model00001/D/ASP/446/OD2 to model00001/D/LYS/239/NZ: 3.776
model00001/E/ASP/429/OD1 to model00001/A/ARG/424/NE: 2.589
model00001/E/ASP/429/OD2 to model00001/A/ARG/424/NE: 3.604
model00001/E/GLU/437/OE2 to model00001/E/ARG/310/NE: 3.311
model00001/E/ASP/446/OD2 to model00001/E/LYS/239/NZ: 3.776
Message: 3
Date: Fri, 12 Feb 2021 14:07:13 +0000
From: "Chen, Qiang" <[email protected]>
To: "[email protected]"
<[email protected]>
Subject: Re: [PyMOL] PyMOL-users Digest, Vol 177, Issue 5
Message-ID:
<bl0pr04mb466024e36e795ae57cbbc6a7fa...@bl0pr04mb4660.namprd04.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
In case anyone has a similar problem, here is my solution
from pymol import cmd
from glob import glob
cmd.do("run list_hb.py")
for file in glob("model*.pdb"):
print(file)
cmd.load(file)
obj=cmd.get_object_list('all')
print(obj)
#hydrogen bonds
cmd.do("list_hb all, all, write_distances_file=hb_"+str(obj[0])+".txt")
#salt bridge
cmd.do("select negative, (resn ASP+GLU and name OD*+OE*)")
cmd.do("select positive, (resn Lys and name NZ) or (resn ARG and name NE +
NH*)")
cmd.do("pairwise_dist negative, positive, 4, show=N, output="+str(obj[0]))
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/[email protected]
Unsubscribe:
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe