[Chimera-users] undisplay label in distance monitor
pett at cgl.ucsf.edu
Tue Jun 5 11:27:12 PDT 2012
On Jun 4, 2012, at 11:54 PM, Bala subramanian wrote:
> I have written a script to draw lines between atoms (using distance
> monitor). I dnt want the distance label to be displayed with the
> pseudo bond. Kindly write me the way to remove the label. My script
> is below.
> for x in range(len(res)):
> for y in range(len(res)):
> if x <> y :
> if 0.5 < value > 0.75:
> #b.label=None I tried keeping this value as None and
> empty string but it doesnt help.
> else: pass
> else: continue
distanceMonitor pseudobonds are designed to do exactly what you find
them to be doing: showing an updated distance as the model is moved.
What you need to do is make a normal pseudobond group for your own use
that doesn't have all the special processing that distanceMonitor
provides. Here is some example code:
from chimera.misc import getPseudoBondGroup
grp = getPseudoBondGroup("matrix bonds", associateWith=[model])
b = grp.newPseudoBond(res[x].atomsMap['CA'], res[y].atomsMap['CA']
You will probably want to set some attributes of your group, like
color and line type (dashed vs. solid). Here's some code for that:
from chimera.colorTable import getColorByName
grp.color = getColorByName("lime green")
grp.lineType = chimera.Dash
P.S. BTW, this question is probably better for chimera-dev than
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users