Yes, Max, there is a very simple way to do this. If you have a color scheme
in mind, the color() function is what you want:
*x = color(schemeName, min, max, value)*
for example:
$ x = color("rgb",0,2,1.5)
$ print x
{0.0 255.0 255.0}
bmin = {*}.bonds.length.min
bmax = {*}.bonds.length.max
Now you loop through the bonds, get the value of their length, and use that
to deliver a color:
load $caffeine
bmin = {*}.bonds.length.min
bmax = {*}.bonds.length.max
for (var i = {*}.bonds.count; --i >= 0;) {
var x = eval("[{"+i + "}]")
select @x
color bonds @{color("rgb",bmin, bmax, x.length)}
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users