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

add ColormakerRegistry? #670

Closed
hainm opened this issue Aug 11, 2017 · 3 comments
Closed

add ColormakerRegistry? #670

hainm opened this issue Aug 11, 2017 · 3 comments

Comments

@hainm
Copy link
Collaborator

hainm commented Aug 11, 2017

Not sure it it's useful in nglview. Or may be just let people do that in ngl?

@hainm
Copy link
Collaborator Author

hainm commented Aug 11, 2017

https://github.com/arose/ngl/blob/master/doc/usage/coloring.md#selection-based-coloring

var schemeId = NGL.ColormakerRegistry.addSelectionScheme([
  ["red", "64-74 or 134-154 or 222-254 or 310-310 or 322-326"],
  ["green", "311-322"],
  ["yellow", "40-63 or 75-95 or 112-133 or 155-173 or 202-221 or 255-277 or 289-309"],
  ["blue", "1-39 or 96-112 or 174-201 or 278-288"],
  ["white", "*"]
], "Transmembrane 3dqb");

stage.loadFile("rcsb://3dqb.pdb").then(function (o) {
  o.addRepresentation("cartoon", {color: schemeId });  // pass schemeId here
  o.autoView();
});

hainm added a commit to hainm/nglview that referenced this issue Oct 27, 2018
@hainm
Copy link
Collaborator Author

hainm commented Oct 27, 2018

screen shot 2018-10-27 at 1 15 23 pm

@hainm
Copy link
Collaborator Author

hainm commented Aug 6, 2019

done in master.

@hainm hainm closed this as completed Aug 6, 2019
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

1 participant