molstar / pdbe-molstar

Molstar PDBe implementation
Apache License 2.0
89 stars 30 forks source link

Enable pLDDT coloring based on b-factor field in the PDB file #73

Closed halilakin closed 1 year ago

halilakin commented 1 year ago

It seems this question has been asked a few times, but I don't see a definitive answer. Is it possible to color a protein based on the b-factor value in a PDB file? What's the best way of doing this currently?

mandarsd commented 1 year ago

Hi, the pLDDT color theme only works with the mmCIF file and uses the '_ma_qa_metric_local' category values from it. The viewer control has the option to apply the in-built Uncertainty/Disorder theme which uses the b-factor values to color the residues. There is no programmatic option available to apply this theme but you and fork the repo and pass the theme name here - https://github.com/molstar/pdbe-molstar/blob/master/src/app/index.ts#L142 for your implementation.

Here is the theme name you'll have to use - https://github.com/molstar/molstar/blob/master/src/mol-theme/color/uncertainty.ts#L66