For those of us who are not on the developers mailing list, I discovered that the following message, which is archived in the developers list, is very important

http://www.mail-archive.com/[email protected]/msg04660.html

I couldn't get isosurfaces to work in my web pages until I read the following comment:

"path/to/filename.cube"
-----------------------
path name to your gaussian .cube file. This *must* be in double quotes  (as
with the pmesh command).

I kept trying to create isosurfaces using the following code

<script>
         jmolInitialize("../../reuse"); //required to initialize  codebase
jmolApplet(400, "load carbocation_LUMO.cub; isosurface pos 0.045 carbocation_LUMO.cub;", "carbocation")
 </script>

But of course it wouldn't work because my path was not in double quotes. After finding a pmesh example I realized that I should use single quotes around my script, and double quotes around the path. So, the following code did work...

<script>
         jmolInitialize("../../reuse"); //required to initialize  codebase
jmolApplet(400, 'load carbocation_LUMO.cub; isosurface posSurf 0.06 "carbocation_LUMO.cub"; isosurface negSurf -0.06 "carbocation_LUMO.cub"', "carbocation")
</script>

and then I found out the button code would work too! Of course, this only works if you remember to use the new Jmol.js file (I had to quit and restart my browser before the button code would work properly, but YMMV).

<form>
<script>
       jmolInitialize("../../reuse"); //required to initialize codebase
       jmolApplet(400, 'load carbocation_LUMO.cub;', "carbocation")
jmolButton('isosurface posSurf 0.06 "carbocation_LUMO.cub"; isosurface negSurf -0.06 "carbocation_LUMO.cub"'," ");
       jmolHtml("Show LUMO");
 </script>
 </form>

Woo hoo! A quick demo of the buttons bringing up different MO's is here.

http://www.wsc.ma.edu/cmasi/organic/carbocation_stabilization/ carbocation.html

Thanks Miguel, Richard, et al.

Chris

On Sep 30, 2005, at 5:22 PM, Miguel wrote:

 Jmol prerelease 10.00.42 is now available from

   http://www.jmol.org/files

 This release features support for coloring .cub file isosurfaces based
 upon color mapping from another .cub file.

 Surface are colored using a red->orange->yellow->green->blue rainbow,
 where red represents minimum values and blue represents maximum values.

 If absolute data values are not provided then Jmol will calculate the
 range based upon the actual data values calculated for the surface  points.


 You need to supply your own cube files, presumably from gaussian or  equiv.

 Example:

 load "ch3cl-density.cub"; # read in the molecule - old functionality
 isosurface mySurface 0.0004 "ch3cl-density.cub"; # old functionality
 isosurface mySurface color "ch3cl-esp.cub"; # new functionality
 color isosurface translucent;

 OR, put it all on one line:

 isosurface mySurface 0.0004 "ch3cl-density.cub" color "ch3cl-esp.cub";

 OR, specify your own absolute range for color data values:

 isosurface color absolute -0.1 0.5 "ch3cl-esp.cub";


 Note that the subcommand names 'color' and 'absolute' are subject to  change.


 Thanks to Richard Spinney of Ohio State University (USA) for help on  this.


 It looks pretty cool ... Enjoy!

 Miguel





 -------------------------------------------------------
 This SF.Net email is sponsored by:
 Power Architecture Resource Center: Free content, downloads,  discussions,
 and more. http://solutions.newsforge.com/ibmarch.tmpl
 _______________________________________________
 Jmol-users mailing list
 [email protected]
 https://lists.sourceforge.net/lists/listinfo/jmol-users


--
Learn about Brittle Bone Disease...
http://www.oif.org

--
Prof. Christopher Masi, Ph.D.
Assistant Professor of Chemistry
Department of Physical Science
Westfield State College
577 Western Ave
Westfield, MA 01086
(413)572-5371
--
PGP public key available upon request.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to