Skip to content

Superpose many pdbs, use different colors, but keep heavy atoms in a different color. #1050

@pguillem

Description

@pguillem

Hi.

I superposed 5 pdbs mutated on positions 1, 45, 67. The idea is to superpose the backbone structures and highlight the sidechains of those 3 positions only. For this i'm using 2 representations. One where each structure has a different color and display ribbons, and other where the sidechains are highlighted. The heavy atoms should assume the color of their structure (same as the ribbon), but the heavy atoms should keep their default colors (O=red, N=blue, S=yellow, etc).

This is my line representation and selection for displaying the sidechains:
o.addRepresentation("line", {sele: "(1, 45, 67) and (not hydrogen)"})

However, when I assign each structure a color, the heavy atoms in the sidechain lose the default colors and assume the color of the structure.

I tried a ColormakerRegistry like this:

var schemeId = NGL.ColormakerRegistry.addSelectionScheme([
                ['green', "(1 or 45 or 67) and .C"], 
                ['blue', "(1 or 45 or 67) and .N"],
                ['red', "(1 or 45 or 67) and .O"]
], "Name for the structure");

but no luck.

Is there a way that I can keep the default color for heavy atoms on every structure, regardless of the color of carbons?
Thanks in advance

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