Re: [Jmol-users] Jmol-users Digest, Vol 110, Issue 3

2015-07-21 Thread Craig T Martin
Dear all

   I am trying to take some pages created more than 5 years ago in Jmol and 
bring them up to modern JSmol/Jmol standards. I’m now using the most recent 
Jmol release, and using the Jmol2.js adapter routines. I’ve got that running 
fine with a simple test page, but have not been successful with my more complex 
pages.

  In particular, my “complex” page does a lot of javascript rendering of the 
HTML, through calls in the Header section, followed by a call at the end of the 
HTML body (this allows a common framework from my own javascript library, but 
includes simple user HTML).

  As you can see in the code below, what I would like to do is to load my Jmol 
applet into a DIV after the page/document has fully loaded. I create (not 
shown) a DIV dedicated to the applet and I do the call to jmolApplet into a 
variable. Finally, after the page has loaded, I’m trying to load that variable 
into that existing DIV. Everything is working fine, but nothing loads into the 
DIV. No error messages (though I may not know everywhere to look for those).

Any advice here? If you want to play with the page, it can be found at
>

And the older, functioning (and Java-only) page at
>

Thanks,

Craig Martin

// ===
//Global variable
var StoredCodeJmol;

//Writes to DIV JAppDIV, previously prepared
function AfterLoaded() {
$('#JAppDIV').html(StoredCodeJmol);
}

// Set to call above after the document is fully loaded/rendered
$(document).ready(function(){AfterLoaded()});

// Temporarily turn off direct writing
jmolSetDocument(0);

StoredCodeJmol = jmolApplet([1.0,1.0], LoadScript);

//Restore direct writing by Jmol.js calls
jmolSetDocument(document);
// ===

I do get the following in the console, if that’s helpful
=
[Log] JSmol load jmolApplet0 loadClazz... (JSmol.min.js, line 273)
[Log] JSmol load jmolApplet0 start applet... (JSmol.min.js, line 273)
[Log] JSmol exec jmolApplet0 loadClazz null -- OK (JSmol.min.js, line 272)
[Log] xhr.open async=false url=../jsmol/j2s/core/package.js (JSmol.min.js, line 
178)
[Log] xhr.open async=false url=../jsmol/j2s/core/package.js (JSmol.min.js, line 
178)
[Log] xhr.open async=false url=../jsmol/j2s/core/corejmol.z.js (JSmol.min.js, 
line 178)
[Log] xhr.open async=false url=../jsmol/j2s/java/net/UnknownServiceException.js 
(JSmol.min.js, line 178)
[Log] xhr.open async=false url=../jsmol/j2s/J/io/JmolBinary.js (JSmol.min.js, 
line 178)
[Log] xhr.open async=false url=../jsmol/j2s/J/g3d/PrecisionRenderer.js 
(JSmol.min.js, line 178)
=
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] bug: config=1

2015-07-21 Thread Eric Martz

Dear Bob:

Update on these bugs:

The current bug was introduced between Jan 22 and Feb 10.

14.3.2_2015.01.22 still has the bug where it counts *.cb from config=1 
in config=2. It does not have the config=1 bug.


14.3.12_2015.02.10 has the *.cb bug fixed, but introduced the config=1 bug.

Simple test:
load =9ins
select config=1
print {selected}.count
select altloc!='' and config=1 and config=2
print {selected}.count

The correct counts are 484 and 0.
*.cb bug count gives 446 (should be 484).
config=1 bug gives 8 (should be 0).

Eric
 Forwarded Message 
Subject:Fwd: bug: config=1
Date:   Sat, 18 Jul 2015 19:30:35 -0400
From:   Eric Martz 
To: Robert Hanson 



Hi, Bob, I'm forwarding this directly to you since sourceforge seems to 
have been down for hours.


I love the pivot thing for the list of elements, but I'll need this bug 
fixed before I can release the next version of FirstGlance (not urgent).


Regards, Eric


 Forwarded Message 
Subject:bug: config=1
Date:   Sat, 18 Jul 2015 17:09:08 -0400
From:   Eric Martz 
To: jmol-users@lists.sourceforge.net



Testing Jmol 14.3.14_2015.07.09 I find what appears to me to be a bug.
Transcript, with my comments added after #.
The correct number of altloc atoms in 9ins can be verified by entering
the PDB code here:http://bip.weizmann.ac.il/oca-bin/altloc  (thanks to
Jaime Prilusky).
There are 48 in each of configs 1 and 2.

$ load =9ins
HORMONE 23-OCT-91   9INS
MONOVALENT CATION BINDING IN CUBIC INSULIN CRYSTALS
found biomolecule 1: A, B
found biomolecule 2: A, B

$ select all
532 atoms selected $ CORRECT
$ select altloc=''
436 atoms selected # CORRECT: 532 - (48 + 48) = 436.
$ select config=1
446 atoms selected # WRONG. CORRECT VALUE IS 436 + 48 = 484.
$ select altloc!=''
96 atoms selected # CORRECT: 48 + 48 = 96.
$ select altloc!='' and config=1
10 atoms selected # WRONG. CORRECT VALUE IS 48.

I have tried extracting just one or two amino acids into a PDB file, but
I have not come up with a simple example that elicits this bug.

Another example is 1bsz, where Jaime's counter reports 74 atoms in each
of configs 1 and 2, and 10 atoms in config 3:

$ load =1bsz
HYDROLASE   01-SEP-98   1BSZ
PEPTIDE DEFORMYLASE AS FE2+ CONTAINING FORM (NATIVE) IN COMPLE
INHIBITOR POLYETHYLENE GLYCOL
found biomolecule 1: A
found biomolecule 2: B
found biomolecule 3: C

$ select altloc=''
4272 atoms selected # CORRECT: 4430 - (74 + 74 + 10) = 4272.
$ select config=1
4287 atoms selected # WRONG: 4272 + 74 = 4346.
$ select altloc!=''
158 atoms selected # CORRECT: 74 + 74 + 10 = 158.
$ select altloc!='' and config=1
15 atoms selected # WRONG. SHOULD BE 74.


While investigating this, I noticed that Jmol 14.3.7_2014.09.20 (which I
am currently using in FirstGlance) incorrectly counts carbon beta atoms
(*.cb) from config=1 in the config=2 count. This bug appears to be fixed
in 14.3.14_2015.07.09.

-Eric





--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users