Kevin has fixed the problems with CIF files (mostly). Thank you, Kevin!

I think this is a pretty good start to a solution to a very difficult
problem. If you take a look at

  http://chemapps.stolaf.edu/jmol/chemdoodle

and its contained files, you will see some interesting ones. Specifically,
http://chemapps.stolaf.edu/jmol/chemdoodle/JmolCD.js is a library of
extensions to ChemDoodle. What it actually does is to create a high-level
object called "Jmol" (conveniently!) that loads applets in a new way. I
think it is our new "Jmol object" JavaScript. And I suggest we make it THE
development platform for the applet. It's really got some nice features,
like being able to go to a server-side JmolData.jar if Java or applets are
not enabled on a device to get just an image, or work just like we have
now, if you want that. It does require an additional 250K JavaScript
download, but if you are willing to live with that, I think it has a lot to
offer. This library is used by
http://chemapps.stolaf.edu/jmol/chemdoodle/test2.htm  Take a look behind
the scenes there, and you will see this:

  var Info = {
        id: "molgrabber1",
        width: 300,
        height: 300,
        debug: true,
        addSelectionOptions: true,
        serverURL: "http://chemapps.stolaf.edu/jmol/jmolcd2.php";,
        defaultModel: "morphine",
        useChemDoodleOnly: useChemDoodleOnly,
        useJmolOnly: useJmolOnly,
        useWebGlIfAvailable: useWebGlIfAvailable,
        useImageOnly: useImageOnly,
        jmolJarPath: ".",
        jmolJarFile: (useSignedApplet ? "JmolAppletSigned.jar" :
"JmolApplet.jar"),
        jmolIsSigned: useSignedApplet,
        jmolReadyFunctionName: "jmol_isReady"
    }


and then, later:

<script>molgrabber = Jmol.getMolGrabber(Info)</script>

That's all there is to it! This creates a Jmol object called "molgrabber"
that can act like the applet, but also do all sorts of other interesting
things. As this progresses, I'll add all the standard applet code to that,
and eventually, I think, Jmol.js will no longer be necessary, though right
now it is. For example, right now you can use

  molgrabber.script("background white")

or whatever.

Mind you, ChemDoodle has no high-level scripting language, and it's not set
up to change an image on the fly, so that would only work if you have just
the standard Jmol applet there. But in any case, it's a start. Here's a new
capability of the UNSIGNED applet:

molgrabber.search("$tylenol")

That retrieves the NCI "tylenol" model.

molgrabber.search("=1crn")

Does what you think. -- retrieves a model from the PDB database, even for
the unsigned applet.


So check it out!


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
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to