Hi Vincent,
Just like you can change the balloon for atoms, you can change the balloon for residues.  To change the atom balloon, you changed the “description” method in the PickedAtom class.  To change the residue one, change the description method in the PickedResidue class.  In structure.py search for “class PickedResidue” and change the body of its description method from:

return str(self.residue)

to:

return str(self.residue) + (' %s bfactor %g' % (self.residue.principal_atom.name, self.residue.principal_atom.bfactor) if self.residue.principal_atom else ‘')

—Eric

On Sep 15, 2025, at 2:58 AM, Vincent CHAPTAL via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Eric, 

it would be useful to display the bfactor value of the Calpha of that given residue. 
I'll find a workaround for my need. 

Thank you
Vincent

Le 12/09/2025 à 19:01, Eric Pettersen a écrit :
Hi Vincent,
The ribbon depiction is a stylized representation of the entire amino-acid backbone.  It isn't broken down into individual atoms.  That's why when you hover over it, it displays the residue information, not any kind of atom information.  I don't think there is much you can do here, other than "cartoon suppressBackbone false" to also show the individual atoms along with the ribbon.

--Eric

On Sep 12, 2025, at 1:05 AM, Vincent CHAPTAL <vincent.chaptal@cnrs.fr> wrote:

Hi Eric, 

the script modification works when the atoms are shown but not on cartoon display, which is where I'd like to see it as well. 
(script sent directly in another email)

Thanks
Vincent

Le 11/09/2025 à 23:30, Eric Pettersen a écrit :
Send me a copy of your edited file.

—Eric

On Sep 11, 2025, at 12:29 AM, Vincent CHAPTAL via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Eric, 

I updated to the latest nightly build (my previous version had 
return str(self.atom) on a different line) and did exactly what you describe but it doesn't display the bfactor next to the atom information after several restart of chimeraX (I kept the indentation). 

Best
Vincent

Le 05/09/2025 à 20:58, Eric Pettersen a écrit :
Hi Vincent,
I don't think there's any control for that, but it's pretty simple to hack into the code of your ChimeraX installation.  You need to edit a file named structure.py in your installation.  To find out where that file is, open ChimeraX's Python shell (Tools→General→Shell) and type:

from chimerax.atomic import structure
structure.__file__

The output from that second line will show where structure.py is on your system.  Use an editor to change line 2223 of that file from:

return str(self.atom)

to:

return str(self.atom) + " bfactor %g" % self.atom.bfactor

Make sure to retain the indentation (which is important to Python) and that you write out the file as plain text.  Then the next time you start ChimeraX the balloons should show the atom's bfactor information.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Sep 5, 2025, at 2:31 AM, Vincent CHAPTAL via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hello, 

I'd like to know, in addition to residue name and model, the bfactor of a residue when the mouse goes over it. 
For example model#1.20/A PHE 1482 bfactor 120.7

Could you help me to do it? 

Thanks a lot.
Vincent
-- 
Vincent Chaptal, PhD
Director of GdR APPICOM
Drug Resistance and Membrane Proteins Lab

MMSB -UMR5086
7 passage du Vercors 
69007 LYON
FRANCE
+33 4 37 65 29 01

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/


-- 
Vincent Chaptal, PhD
Director of GdR APPICOM
Drug Resistance and Membrane Proteins Lab

MMSB -UMR5086
7 passage du Vercors 
69007 LYON
FRANCE
+33 4 37 65 29 01

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/


-- 
Vincent Chaptal, PhD
Director of GdR APPICOM
Drug Resistance and Membrane Proteins Lab

MMSB -UMR5086
7 passage du Vercors 
69007 LYON
FRANCE
+33 4 37 65 29 01


-- 

Vincent Chaptal, PhD

Director of GdR APPICOM

Drug Resistance and Membrane Proteins Lab


MMSB -UMR5086

7 passage du Vercors 

69007 LYON

FRANCE

+33 4 37 65 29 01

http://www.appicom.cnrs.fr

http://mmsb.cnrs.fr/en/


_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/