Dear fellow users,
among other things I use pymol to edit PDB files so as to use them in
an ORCA calculation. This entails changing the occupancy and B-factors
to values of 0, 1 and 2.
Changing these entries to the appropriate values but selecting, e.g.,
all atoms with a q value of 1 or 1.00
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,
Hi Benedikt,
You can do a work around with '<' or '>':
Sele qm, q>0.999 and q<1.001
I checked that this works like this for my "obj" in PyMOL:
stored.q = []
iterate obj, stored.q.append(q)
q_arr = np.array(stored.q)
q_1 = q_arr[q_arr == 1] # only keep values of q that equal 1
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,