molstar icon indicating copy to clipboard operation
molstar copied to clipboard

How to set the custom residues label in the bottom right corner of the panel when hovering over them

Open CrazyHsu opened this issue 1 year ago • 3 comments

Hello,

I am currently working on visualizing PDB files that have been scored in the B-factor column by other tools.

While AlphaFold2 provides CIF files and PDB files for predicted structures, I've noticed that when I hover over residues in the CIF structure, the pLDDT score is displayed in the right-bottom corner of the panel. However, this is not the case for PDB files.

Is there a way to display the B-factor scores from PDB files in the right-bottom corner of the panel? Alternatively, when providing a CIF file, is it possible to customize the text preceding the scores instead of the default 'pLDDT score'?

Thanks.

CrazyHsu avatar Jan 17 '24 14:01 CrazyHsu

you can check the code in src/mol-theme/label.ts --> _elementLabel

xiaoxudoo avatar Jan 23 '24 16:01 xiaoxudoo

You can add your own "loci label provider" that accomplishes this. Search managers.lociLabels.addProvider to get some examples in the codebase.

dsehnal avatar Jan 28 '24 04:01 dsehnal

@xiaoxudoo @dsehnal Thanks for your help. I will try the method you mentioned.

CrazyHsu avatar Jan 29 '24 06:01 CrazyHsu