Jmol users --

I think there has been interest in the past for the ability to have a color
key for a mapped isosurface. While I don't have that exactly, the addition
of the color() function to Jmol should make that possible -- particularly
for the applet, where a bit of added JavaScript would do the job nicely.

Topic 5. new color() function and getProperty
shapeInfo.isosurface[n].colorKey

Jmol 12.1.5 adds the capability to check and work with color schemes,
including standard Jmol color schemes such as "roygb" or "Jmol", custom
color schemes such as "myScheme", the propertyColorScheme value, or --
especially -- the color scheme associated with an isosurface. The capability
should make it easy to write a visual color key for any isosurface. The
function has several forms that allow getting all the details or getting a
specific color associated with a value. In addition, getProperty shapeInfo
is expanded to include the color key for each mapped isosurface. This could
be of interest for building JavaScript widgets that graphically display an
isosurface color key next to or within the applet.

load 1crn.pdb;color property temperature
prompt color("roygb").keys
prompt color("")["colors"]
prompt color("")["values"]
prompt color("rwb",0.0,10.0,5.0) # the color for the value 5 in the range 0
to 10
prompt color("rwb",5) # the fifth color
load 1crn.pdb;isosurface ID "iso1" vdw map property temperature
prompt getProperty("shapeInfo.isosurface[1].colorkey")
prompt "isosurface min/max: " + color("$iso1")["min"] + " " +
color("$iso1")["max"]
prompt "isosurface color for temperature 10.0: " + color("$iso1", 10.0)

See http://chemapps.stolaf.edu/jmol/docs/examples-12/new.htm?topic=5

--Bob

-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to