This is just an advisory about Jmol state that may save some other users some 
frustration. After the fact, I see that the frustrating situation is actually a 
design feature. I just missed it. If you want to save time on the issue, jump 
to the Bottom Line in my last sentence.

I'm getting state with:

1) stateData = Jmol.getPropertyAsString(jmolApplet0, "stateInfo");

If a triple bond containing model is loaded with a SMILES, then the state file 
contains something like the following after it's saved to server:

2) load model ({0}) /*file*/"http://chemagic.com/models.aspx?smi2sdf=CC#C";;

That needs to be the following to communicate with Resolver:

3) load model ({0}) /*file*/"http://chemagic.com/models.aspx?smi2sdf=CC%23C";;

This is all well and good. You need to make these # URL conversions when you 
work with Resolver.

Here's the advisory: When you go to make this change using replace on the state 
variable, you need to know that 1 above already has the value "%23" in place 
for triple bond #. This, however, gets written to server as #. Consequently, a 
replace statement on stateData would look something like this:

4) stateData = stateData.replace(/%23/g, "!HASH!");

Not:

5) stateData = stateData.replace(/#/g, "!HASH!");

Since the state variable is used directly in Jmol to RESTORE model state, I now 
see why this had to be handled this way. Bottom Line: If you're looking for a 
triple bond # in a state file variable, look for %23, not #.

Otis

--
Otis Rothenberger
[email protected]
http://chemagic.com







------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to