<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 4, 2012, at 11:54 PM, Bala subramanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Friends,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">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.<br> <br>model=chimera.openModels.open('myavg.pdb') <br> res=model[0].residues<br>MAT=loadtxt('mymatrix',dtype=float) <br>chimera.runCommand('focus')<br>for x in range(len(res)):<br> for y in range(len(res)):<br> if x <> y :<br> value=MAT[x,y]<br> <br> if 0.5 < value > 0.75:<br> b=distanceMonitor.newPseudoBond(res[x].atomsMap['CA'][0],res[y].atomsMap['CA'][0])<br> b.drawMode=1<br> b.radius=0.05<br> <span style="color:rgb(255,102,102)">#b.label=None I tried keeping this value as None and empty string but it doesnt help.</span><br> b.color=getColorByName('red')<br><br> else: pass<br><br> else: continue<br><br> </blockquote></div></blockquote></div><br><div>Hi Bala,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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:</div><div><br></div><div>from chimera.misc import getPseudoBondGroup</div><div>grp = getPseudoBondGroup("matrix bonds", associateWith=[model])</div><div><br></div><div>...then later...</div><div><br></div><div>b = grp.newPseudoBond(res[x].atomsMap['CA'][0], res[y].atomsMap['CA'][0])</div><div><br></div><div>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:</div><div><br></div><div>import chimera</div><div>from chimera.colorTable import getColorByName</div><div>grp.color = getColorByName("lime green")</div><div>grp.lineType = chimera.Dash</div><div><br></div><div>--Eric</div><div><br></div><div>P.S. BTW, this question is probably better for chimera-dev than chimera-users...</div><div><br></div><div><br></div></body></html>