Skip to content

I want to color the nodes based on the b-factor value. #123

Open
@innocent-art

Description

@innocent-art

Hi,

I want to use pdbe-molstar in my project, but I’m encountering an issue. I want to color the nodes based on the b-factor value using the d3.js color scale:
const colorScale = d3.scaleLinear().domain([0, 100]).range(["#420458", "#f8e600"]);
There is an example of this functionality here: https://build.nvidia.com/deepmind/alphafold2-multimer?ncid=so-nvsh-691430-vt12

I might be able to use the following configuration to color the nodes:

const options = {
customData: {
url: url,
format: 'pdb',
},
hideControls: false,
landscape: true,
selection: {
data: [
{
atom_id: [1, 2, 3, 4, 5, 6, 7, 8, 9],
color: '#FF0000',
},
],
nonSelectedColor: '#CCCCCC',
},
};

This requires formatting and filtering the entire PDB text into a web format and processing the data. However, when my dataset is large, this approach becomes inefficient.
Is there a more efficient configuration or method to achieve this?

I would greatly appreciate any help related to this. Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions