On Jun 11, 2014, at 7:01 AM, Robert Hanson wrote:

> Wow, this is terrific! 

Glad you like it!

> 
> A few comments:
> 
> Something in that load is usurping the $ jQuery alias. Glad to see Jmol does 
> not care. (This is the magic of the Google Closure Compiler and anonymous  
> functions.) So that's throwing an error in your loading script.

I suspect that is due to the ancient Wordpress theme we got from the college, 
which loads its own outdated version of jQuery. Another side project is to 
learn more about theme development in Wordpress to make the site cleaner. 

> 
> You could trim down that code (I'm sure you know) that you  copied from 
> chemapps. All the xxxx stuff, for example. No need for that.

I confess that this reflects how weak my javascript and Jmol scripting 
knowledge is. The template started from the simple.htm that you included with 
the distribution, and then I started hacking at it until it worked.  Not great 
programming practice. It took me a while to understand at all how it works.

I was thinking that the xxxx stuff was useful if I want users to be able to put 
back a menu-based model selector, but maybe there's a better way to do that.

> 
> You can get essentially any small molecule within Jmol with the prefix $:
> 
> load $caffeine
> load $2-bromo-3-nitrobenzene  # note the incorrect name - still works!
> load $tylenol
> 
> This uses the NCI resolver (http://cactus.nci.nih.gov/chemical/structure). 
> There is no longer any need to save such files on your own. (Provided that 
> server is up...)

I was wondering how "load $caffeine" worked. I had been guessing that it was 
looking something up in the data directory. So, if I can omit the data 
directory, that would make the distribution much smaller (which would be very 
nice).

> 
> You can get any PDB ligand using ==
> 
> load ==hem
> 
> You can access standard InChI and standard InChIKeys using pubChem and ":"
> 
>  load :inchikey:RYYVLZVUVIJVGH-UHFFFAOYSA-N
> 
> I got that from the following at your blog using:
> 
>   show chemical stdinchikey
> 
> Actually, from the developer console, I used:
> 
> Jmol.evaluateVar(jmolApplet0,"show('chemical stdinchikey')")
> 
> 
> 
> 
> Note that "std" there is important -- PubChem keys models on standard 
> InChIKeys specifically.
> 
> $show chemical inchikey
> InChIKey=RYYVLZVUVIJVGH-UHFFFAOYSA-N
> 
> $show chemical stdinchikey
> InChIKey=RYYVLZVUVIJVGH-UHFFFAOYNA-N
> 
> (Henry can tell us why there is a difference there.)
> 
> You can also use SMILES at NCI:
> 
> load $C\C=C/C#C
> 
> or PubChem:
> 
> load :smiles:C\C=C/C#C
> 
> The difference there is that at PubChem the chemical you want has to be in 
> their database; at NCI, they will use Peter Murray-Rust's incredible OPSIN 
> program to determine the structure from the name. No database necessary!
> 
> Jmol can create SMILES code natively.  So the following code takes a 
> currently loaded molecule and reloads the equivalent from NCI:
> 
> load @{"$" + {*}.find("SMILES")}
> 
> or from PubChem:
> 
> load @{":smiles:" + {*}.find("SMILES")}
> 
> And the following loads it from PubChem if it finds it, and if not, from NCI:
> 
> s = {*}.find("SMILES")
> try {
>   load @{":smiles:"+s}
> } catch(e) {
>   load @{"$"+s}
> }
> 
> etc. etc.

awesome. I have barely scratched the surface of what Jmol does. Now, if only I 
didn't have that grant to write...

Jim

> 
> Bob
> 
> ​
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems_______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users

=====================================
Jim Hu
Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to