-
Notifications
You must be signed in to change notification settings - Fork 85
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
Partial coloring of structure #182
Comments
Hi! Could you find any solution for your problem, I have the same issue. |
A little late here but this is what I did. If you color by chain first you can then select individual atoms or residues by some criteria and overlap the color of your choice on top of the chain coloring. That's what I'm doing here:
|
Hello!! Thank you for your attention |
Hello, Marco!
I'm lost (err, again ;) in the documentation of your omnipotent ;) pv. I need in partial coloring of structure. From pv documentation I revealed that I need in something like "Color structure by custom property" i.e. in function pv.color.byResidueProp(), but I don't need in 'funky' colors. I don't need in rainbow and/or gradient. I need in uniform coloring per chain (it's done) while SOME residues have unique colors (I'll handle both list of these residues and colors per residue). Could you enhance the documentation with this kind of example? Thank you in advance!
P.S. I've tried to use something like
var index = 0;
structure.eachResidue(function(r) {
var tmpc;
if (index==0) { tmpc=9; }
else { tmpc=4; }
r.setProp('funky', tmpc);
index++;
});
or
var index=0;
structure.eachResidue(function(r) {
var tmpc;
if (index==0) { tmpc='red'; }
else { tmpc='blue'; }
r.setProp('funky', tmpc);
index++;
});
Unfortunately it doesn't work.
The text was updated successfully, but these errors were encountered: