popup balloons with custom information for vrml models

<mailto:chimera-dev@cgl.ucsf.edu> Dear Chimera developers, We are developing an extension that renders vrml models using BILD commands. For the moment the vrml models have a name that shows up on Models Panel, but when the mouse is placed on top of them only the number of model is displayed (like '#11'). We would like to add to the models a popup balloon with customized information, in a similar way as information if shown for classical chimera objects (atoms, bonds...). Could you guide us on how to approach it? I will use this e-mail also to let you know that the link to chimera's source code (https://plato.cgl.ucsf.edu/trac/chimera/browser/trunk) found in this page https://www.cgl.ucsf.edu/chimera/docs/sourcecode.html returns a 404 error. Is there an alternative way to check it out? Thank you for your help, Mercè

On Sep 12, 2022, at 6:28 AM, Merce Alemany Chavarria via Chimera-dev <chimera-dev@cgl.ucsf.edu> wrote:
Dear Chimera developers,
We are developing an extension that renders vrml models using BILD commands. For the moment the vrml models have a name that shows up on Models Panel, but when the mouse is placed on top of them only the number of model is displayed (like '#11'). We would like to add to the models a popup balloon with customized information, in a similar way as information if shown for classical chimera objects (atoms, bonds...). Could you guide us on how to approach it?
Hi Mercè, So the first thing I'd like to say is that this is a whole lot easier in ChimeraX, and we actively support and work on ChimeraX, whereas Chimera is legacy software so you might want to consider doing this in ChimeraX instead if possible. Nonetheless, there is an extremely kludgy way to do this in Chimera. It involves giving the BILD model a fake "molecule" attribute that in turn has an "oslIdent()" method that returns what you want to display in the balloon help. So assuming your BILD model was in a variable named "b" and you wanted it to show the balloon help "B's balloon help", this would do it: class BalloonHelp: def __init__(self, info): self.info <http://self.info/> = info def oslIdent(self): return self.info <http://self.info/> b.molecule = BalloonHelp("B's balloon help")
I will use this e-mail also to let you know that the link to chimera's source code (https://plato.cgl.ucsf.edu/trac/chimera/browser/trunk <https://plato.cgl.ucsf.edu/trac/chimera/browser/trunk>) found in this page https://www.cgl.ucsf.edu/chimera/docs/sourcecode.html <https://www.cgl.ucsf.edu/chimera/docs/sourcecode.html> returns a 404 error. Is there an alternative way to check it out?
I see no such link in that page. The source code checkout given in that page is "svn checkout https://svn.cgl.ucsf.edu/svn/chimera/trunk chimera", which works fine for me. --Eric Eric Pettersen UCSF Computer Graphics Lab

In ChimeraX, the .note command sets the balloon help for subsequent objects. Is that sufficient to do what you want? -- Greg On 9/12/2022 11:05 AM, Eric Pettersen via Chimera-dev wrote:
On Sep 12, 2022, at 6:28 AM, Merce Alemany Chavarria via Chimera-dev <chimera-dev@cgl.ucsf.edu> wrote:
Dear Chimera developers,
We are developing an extension that renders vrml models using BILD commands. For the moment the vrml models have a name that shows up on Models Panel, but when the mouse is placed on top of them only the number of model is displayed (like '#11'). We would like to add to the models a popup balloon with customized information, in a similar way as information if shown for classical chimera objects (atoms, bonds...). Could you guide us on how to approach it?
Hi Mercè, So the first thing I'd like to say is that this is a whole lot easier in ChimeraX, and we actively support and work on ChimeraX, whereas Chimera is legacy software so you might want to consider doing this in ChimeraX instead if possible. Nonetheless, there is an extremely kludgy way to do this in Chimera. It involves giving the BILD model a fake "molecule" attribute that in turn has an "oslIdent()" method that returns what you want to display in the balloon help. So assuming your BILD model was in a variable named "b" and you wanted it to show the balloon help "B's balloon help", this would do it:
class BalloonHelp: def __init__(self, info): self.info <http://self.info/> = info
def oslIdent(self): return self.info <http://self.info/>
b.molecule = BalloonHelp("B's balloon help")
I will use this e-mail also to let you know that the link to chimera's source code (https://plato.cgl.ucsf.edu/trac/chimera/browser/trunk) found in this page https://www.cgl.ucsf.edu/chimera/docs/sourcecode.html returns a 404 error. Is there an alternative way to check it out?
I see no such link in that page. The source code checkout given in that page is "svn checkout https://svn.cgl.ucsf.edu/svn/chimera/trunk chimera", which works fine for me.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev

Hello Eric and Greg, thank you for your responses. I have followed your instructions for Chimera and it worked fine. In my group we still don't have experience with ChimeraX but we will start working on it soon. Thanks again for your help, Mercè ________________________________ De: Greg Couch <gregc@cgl.ucsf.edu> Enviat el: dilluns, 12 de setembre de 2022 20:23 Per a: Chimera Dev <chimera-dev@cgl.ucsf.edu>; Eric Pettersen <pett@cgl.ucsf.edu>; Merce Alemany Chavarria <Merce.Alemany@uab.cat> Tema: Re: [chimera-dev] popup balloons with custom information for vrml models No soleu rebre correu de gregc@cgl.ucsf.edu. Descobriu per què aquest fet pot ser un problema<https://aka.ms/LearnAboutSenderIdentification> In ChimeraX, the .note command sets the balloon help for subsequent objects. Is that sufficient to do what you want? -- Greg On 9/12/2022 11:05 AM, Eric Pettersen via Chimera-dev wrote: On Sep 12, 2022, at 6:28 AM, Merce Alemany Chavarria via Chimera-dev <chimera-dev@cgl.ucsf.edu<mailto:chimera-dev@cgl.ucsf.edu>> wrote: Dear Chimera developers, We are developing an extension that renders vrml models using BILD commands. For the moment the vrml models have a name that shows up on Models Panel, but when the mouse is placed on top of them only the number of model is displayed (like '#11'). We would like to add to the models a popup balloon with customized information, in a similar way as information if shown for classical chimera objects (atoms, bonds...). Could you guide us on how to approach it? Hi Mercè, So the first thing I'd like to say is that this is a whole lot easier in ChimeraX, and we actively support and work on ChimeraX, whereas Chimera is legacy software so you might want to consider doing this in ChimeraX instead if possible. Nonetheless, there is an extremely kludgy way to do this in Chimera. It involves giving the BILD model a fake "molecule" attribute that in turn has an "oslIdent()" method that returns what you want to display in the balloon help. So assuming your BILD model was in a variable named "b" and you wanted it to show the balloon help "B's balloon help", this would do it: class BalloonHelp: def __init__(self, info): self.info<http://self.info/> = info def oslIdent(self): return self.info<http://self.info/> b.molecule = BalloonHelp("B's balloon help") I will use this e-mail also to let you know that the link to chimera's source code (https://plato.cgl.ucsf.edu/trac/chimera/browser/trunk) found in this page https://www.cgl.ucsf.edu/chimera/docs/sourcecode.html returns a 404 error. Is there an alternative way to check it out? I see no such link in that page. The source code checkout given in that page is "svn checkout https://svn.cgl.ucsf.edu/svn/chimera/trunk chimera", which works fine for me. --Eric Eric Pettersen UCSF Computer Graphics Lab _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu<mailto:Chimera-dev@cgl.ucsf.edu> https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
participants (3)
-
Eric Pettersen
-
Greg Couch
-
Merce Alemany Chavarria