You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is a bit counterintuitive that colorfunc only allows to return colors and not the normal colorschemes
Describe the solution you'd like
let colorFixedSidechain = function(atom){
if (selectedResidues.includes(atom.resi)){
return "red"
}else{
return "WhiteCarbon"
}
}
Describe alternatives you've considered
let colorFixedSidechain = function(atom){
if (selectedResidues.includes(atom.resi)){
return "red"
}else if (atom.elem == "O"){
return "red"
}else if (atom.elem == "N"){
return "blue"
}else if (atom.elem == "S"){
return "yellow"
}else{
return "lightgray"
}
}
The text was updated successfully, but these errors were encountered:
I really think the right solution is to implement colorfunc using getColorFromStyle:
let colorFixedSidechain = function(atom){
if (selectedResidues.includes(atom.resi)){
return "red"
}else{
return $3Dmol.getColorFromStyle(atom, {colorscheme: "whiteCarbon"});
}
}
@Omkar0803 If you'd like to get started contributed to the codebase, a nice easy first step to best resolve this issue is:
Modify getColorFromStyle so it's comment is parsed as a jsdoc comment and it shows up in the documentation (it is missing an *).
Modify getColorFromStyle os it can accept a string as well as a style object that will be assumed to be a color scheme name (so the above can be written more succinctly)
Add a test that evaluates this functionality.
Submit a pull request with the result that references this issue.
Is your feature request related to a problem? Please describe.
It is a bit counterintuitive that colorfunc only allows to return colors and not the normal colorschemes
Describe the solution you'd like
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: