[Jmol-users] a bug or changes in code?

2016-01-20 Thread Pshemak Maslak
I have noticed that a script that worked with a version that was current in March 2015 (14.2.13_2015.03.23) does not work with the latest two (or more) versions. Briefly, I have a short DNA fragment in a png file that loads with the following commands: load DNAH-2.png; set showHydrogens

Re: [Jmol-users] a bug or changes in code?

2016-01-20 Thread Rolf Huehne
On 01/20/2016 07:37 PM, Pshemak Maslak wrote: > I have noticed that a script that worked with a version that was current > in March 2015 (14.2.13_2015.03.23) does not work with the latest two (or > more) versions. > > Briefly, I have a short DNA fragment in a png file that loads with the >

Re: [Jmol-users] a bug or changes in code?

2016-01-20 Thread Pshemak Maslak
Thanks Rolf. That helps. PM On 1/20/2016 2:51 PM, Rolf Huehne wrote: > On 01/20/2016 07:37 PM, Pshemak Maslak wrote: >> I have noticed that a script that worked with a version that was current >> in March 2015 (14.2.13_2015.03.23) does not work with the latest two (or >> more) versions. >> >>

Re: [Jmol-users] how to count number of Jmols in a page

2016-01-20 Thread Robert Hanson
jQuery to the rescue. $('[id$="_appletdiv"]').length ​ -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web

Re: [Jmol-users] a bug or changes in code?

2016-01-20 Thread Robert Hanson
That sounds right. We get our DSSR analysis from Columbia University, and that format did recently change. It was a beta version previously; it should be stable now. Sorry for the trouble. Bob​ -- Site24x7 APM Insight:

[Jmol-users] how to count number of Jmols in a page

2016-01-20 Thread Angel Herráez
Hi all I need to find out the numer of Jmol objects existing so far in a page. I was expecting this to work alert( Jmol._applets.length ) However, it returns 'undefined'. I can see that Jmol._applets does exist as a Javascript object. Some posts in the users list say it is an array of

Re: [Jmol-users] how to count number of Jmols in a page

2016-01-20 Thread Angel Herráez
Well, it does not work. "i" is higher than the nr of Jmol objects > BTW, this works though it's unnecessary convoluted in my opinion > var i=0; > for (j in Jmol._applets) { i++; } > alert(i) i comes out as 0, 3, 5, 7 ... That's because each item in Jmol._applets is kind of

Re: [Jmol-users] how to count number of Jmols in a page

2016-01-20 Thread Robert Hanson
Yes, that's pretty much what you have to do. It's not an array; it's an object. Jmol._applets will contain 2n or 2n+1 entries, where n is the number of applets. The "or 2n+1" comes from the fact that I say because I recently fixed a bug that introduced a useless single key/value pair that ended up

Re: [Jmol-users] how to count number of Jmols in a page

2016-01-20 Thread Angel Herráez
OK, Thanks Bob I understand there are functional reasons behind that construction. I still think this needs a rather convoluted method for something that is conceptually simple: how many Jmol objects in a page. And I am not too happy hard-coding this to using internal variables and