Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color all sidechain but heavy atoms #1116

Open
pguillem opened this issue Aug 1, 2024 · 3 comments
Open

Color all sidechain but heavy atoms #1116

pguillem opened this issue Aug 1, 2024 · 3 comments

Comments

@pguillem
Copy link

pguillem commented Aug 1, 2024

Hi.

I have 5 pdbs superimposed. I have a selection of residues 1, 45, 67

I have a line representation, for each PDB:
o.addRepresentation("line", {sele: "(1, 45, 67) and (not hydrogen)"})

And I wish the carbons on the selection to be a different color on each PDB. The heavy atoms of the sidechains should stay the standard color (N=blue, O=red, S=yellow, etc).

If I apply a color='green' to the representation, all atoms in the line get the same color. Heavy atoms are lost :(.

I alsot ried a ColormakerRegistry like this:

var schemeId = NGL.ColormakerRegistry.addSelectionScheme([
                ['green', "(1 or 45 or 67) and .C"]
], "Mutant "+mutantID);

no luck.

Any ideas
Thanks in advance

@hainm
Copy link
Collaborator

hainm commented Aug 1, 2024

@pguillem Please ask the question in https://github.com/nglviewer/ngl since this is the repo for Python stuff.

@pguillem
Copy link
Author

Will do. Thank you very much.

@pguillem
Copy link
Author

Worked like a charm. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants