Small script to show backbone motifs. Use like "motif 10-12" to show a segment from residues 10 to 12.
The (optional) chain argument is the chain letter, but the output lists the chain along with the residue, so it's not essential to use this.
When run, the output looks like this (for pdbid 1arb):
PyMOL>motif 10-12
VAL-10 : ( -62, -31 ) AR
VAL-11 : ( -72, -8 ) AR
CYS-12 : ( -70, 170 ) BR
The "AR", "BR", "AL", "BL" are conformation symbols, and cover quite large regions of the Ramachandran plot. to change them, change the typemap.
<source lang="python">
- very rough bounds!
typemap = { (-180,0, 90, 180) : "BR", (-150, -30, -60, 60) : "AR", (0, 180, 90, 180) : "BL", (30, 150, -60, 60) : "AL" }
def determinetype(phipsi):
phi, psi = phipsi
for bound in typemap:
if bound[0] < phi < bound[1] and bound[2] < psi < bound[3]:
return typemap[bound]
return "?"
def my_phi_psi(selection):
r = cmd.get_phipsi(selection)
if r is not None:
keys = r.keys()
..→