Preference/default for H-bond representation

Hello, Is there a way to set the preference for H-bonds to be represented as dashed lines, not as solid lines? I don't seem to be able to find anything in the Preferences or the documentation. Thanks and Cheers Markus

Hi Markus, Although there is something like that for distance monitors (Save button in the Distances tool), unfortunately there isn’t for H-bond pseudobonds, nor is there an option in the findhbond command or dialog to make them dashed in the first place. That leaves changing them after the fact, e.g. the following command would make all pseudobonds dashed: setattr g lineType 2 You can also specify subsets but only by endpoint atoms, not by the pseudobond group name. GUI ways to make them dashed: (A) Pseudobond Panel (under Tools… General Controls), choose “hydrogen bonds” and click “attributes…” on the right, and in the attributes dialog change “line style” - OR - (B) select any H-bond pseudobond, click green magnifying glass icon to open Selection Inspector, Inspect: pseudobond group, change “line style” How I know to use”setattr” command “g” (pseudobond group” and the attribute name “lineType” and its possible values are by seeing in either of the above dialogs that it is a pseudobond group attribute, and then mousing over “line type” in the dialog to show balloon help with the attribute name and possible values. There must be some place in the code to change it to always dashed, but somebody else would have to advise on that... Sorry for the inconvenience, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 10, 2017, at 2:08 PM, Markus Heller <mheller@cdrd.ca> wrote:
Hello, Is there a way to set the preference for H-bonds to be represented as dashed lines, not as solid lines? I don't seem to be able to find anything in the Preferences or the documentation. Thanks and Cheers Markus

On Jan 12, 2017, at 12:28 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
There must be some place in the code to change it to always dashed, but somebody else would have to advise on that…
To have all hydrogen bonds start out dashed, after line 991 of <your Chimera>/share/FindHBond/base.py (which should be “pbg.lineWidth = lineWidth”) add: pbg.lineType = chimera.Dash with the same indentation as the preceding line. On a Mac, “<your Chimera>” will be Chimera.app/Contents/Resources. —Eric Eric Pettersen UCSF Computer Graphics Lab

Great Eric, thanks. Works as advertised. Any chance of making this more straightforward in ChimeraX or future Chimera releases? From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Thursday, January 12, 2017 12:47 PM To: chimera-users@cgl.ucsf.edu BB Cc: Markus Heller Subject: Re: [Chimera-users] Preference/default for H-bond representation On Jan 12, 2017, at 12:28 PM, Elaine Meng <meng@cgl.ucsf.edu<mailto:meng@cgl.ucsf.edu>> wrote: There must be some place in the code to change it to always dashed, but somebody else would have to advise on that… To have all hydrogen bonds start out dashed, after line 991 of <your Chimera>/share/FindHBond/base.py (which should be “pbg.lineWidth = lineWidth”) add: pbg.lineType = chimera.Dash with the same indentation as the preceding line. On a Mac, “<your Chimera>” will be Chimera.app/Contents/Resources. —Eric Eric Pettersen UCSF Computer Graphics Lab

Hi Markus, I’ll make sure to include it in the ChimeraX implementation when I get there. To get ChimeraX where it needs to go I can’t put too much work into the current Chimera but nonetheless I added a “lineType” option to the hbonds/findhbonds command so that at least in the command version you can get dashed H-bonds without code modifications. The valid options for the lineType are: solid, dashed, dotted, dash-dot, and dash-dot-dot. The option will be available in the next daily build. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Jan 12, 2017, at 1:55 PM, Markus Heller <mheller@cdrd.ca> wrote:
Great Eric, thanks. Works as advertised.
Any chance of making this more straightforward in ChimeraX or future Chimera releases?
From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Thursday, January 12, 2017 12:47 PM To: chimera-users@cgl.ucsf.edu BB Cc: Markus Heller Subject: Re: [Chimera-users] Preference/default for H-bond representation
On Jan 12, 2017, at 12:28 PM, Elaine Meng <meng@cgl.ucsf.edu <mailto:meng@cgl.ucsf.edu>> wrote:
There must be some place in the code to change it to always dashed, but somebody else would have to advise on that…
To have all hydrogen bonds start out dashed, after line 991 of <your Chimera>/share/FindHBond/base.py (which should be “pbg.lineWidth = lineWidth”) add:
pbg.lineType = chimera.Dash
with the same indentation as the preceding line. On a Mac, “<your Chimera>” will be Chimera.app/Contents/Resources.
—Eric
Eric Pettersen UCSF Computer Graphics Lab

Fantastic, Eric! Thanks From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Friday, January 13, 2017 5:39 PM To: Markus Heller Cc: chimera-users@cgl.ucsf.edu BB Subject: Re: [Chimera-users] Preference/default for H-bond representation Hi Markus, I’ll make sure to include it in the ChimeraX implementation when I get there. To get ChimeraX where it needs to go I can’t put too much work into the current Chimera but nonetheless I added a “lineType” option to the hbonds/findhbonds command so that at least in the command version you can get dashed H-bonds without code modifications. The valid options for the lineType are: solid, dashed, dotted, dash-dot, and dash-dot-dot. The option will be available in the next daily build. —Eric Eric Pettersen UCSF Computer Graphics Lab On Jan 12, 2017, at 1:55 PM, Markus Heller <mheller@cdrd.ca<mailto:mheller@cdrd.ca>> wrote: Great Eric, thanks. Works as advertised. Any chance of making this more straightforward in ChimeraX or future Chimera releases? From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] Sent: Thursday, January 12, 2017 12:47 PM To: chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu> BB Cc: Markus Heller Subject: Re: [Chimera-users] Preference/default for H-bond representation On Jan 12, 2017, at 12:28 PM, Elaine Meng <meng@cgl.ucsf.edu<mailto:meng@cgl.ucsf.edu>> wrote: There must be some place in the code to change it to always dashed, but somebody else would have to advise on that… To have all hydrogen bonds start out dashed, after line 991 of <your Chimera>/share/FindHBond/base.py (which should be “pbg.lineWidth = lineWidth”) add: pbg.lineType = chimera.Dash with the same indentation as the preceding line. On a Mac, “<your Chimera>” will be Chimera.app/Contents/Resources. —Eric Eric Pettersen UCSF Computer Graphics Lab
participants (3)
-
Elaine Meng
-
Eric Pettersen
-
Markus Heller