Hi Charles,
Make sure that PyMOL's present working directory is where the pdb files are
stored.
Copy and paste each of the four lines below one at a time on the command line
in PyMOL.
run list_hb.py
import glob
chains = [('A','B'), ('A','C'), ('A','D'), ('A','E'), ('B','C'), ('B','D'),
('B','E'), ('C','D'), ('C','E'), ('D','E') ]
[[cmd.do("list_hb chain "+ str(i) +", chain " +str(j) + ",
write_distances_file=hb_"+ str(file) + "_" + str(i) + "_" +str( j) +
"_001.txt") for i, j in chains] for file in glob.glob("model.??.pdb")]
Note that you do not have to load the pdb files into PyMOL.
If you want to analyze more than 99 files and less than 999 files, add a third
question mark to the argument of glob.glob().
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE 10th Street, BRC 466
Oklahoma City, OK 73104-5419
________________________________________
From: Chen, Qiang [[email protected]]
Sent: Monday, June 15, 2020 2:53 PM
To: [email protected]
Subject: [EXTERNAL] [PyMOL] hydrogen bond list for a series of files
Hi, Pymol users
Could you help me do this in an efficient way?
Let me describe the task I try to do.
I have a series of numerically ordered files, say model00.pdb model.01.pdb ……
model.30.pdb
All the pdb have the same protein composition, chain A, B, C, D, and E. Their
relative position is different in each file.
I would like to check the hydrogen bonds between, say, chain A and B.
Thanks to Prof. Robert L. Campbell, I can list the hydrogen bonds in one pdb
and print the list as the follows
list_hb chain A, chain B, write_distances_file=hb_A_B_01.txt
How can I process the 30 files in an efficient way? what if I have 300 pdb
files?
Shell script, python, or anything else?
Thanks!
Charles Chen
_______________________________________________
PyMOL-users mailing list
Archives:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_pymol-2Dusers-40lists.sourceforge.net&d=DwIGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=xyAmhZRZYDjhbBLdiMRRk6wCJ14kA5UeQYC4urBFvQw&s=aOpeSOw9Gqop8KF8Xf_lkPoBC_MSbb5i0cKlRaIAulI&e=
Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_projects_pymol_lists_pymol-2Dusers_unsubscribe&d=DwIGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=xyAmhZRZYDjhbBLdiMRRk6wCJ14kA5UeQYC4urBFvQw&s=PY-g0XYMB9DqXC06Iixbjxfqf8jB9Pb_GFu8zClx3oY&e=
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/[email protected]
Unsubscribe:
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe