Brian, how did you create sucrose2.spt? It is that white space -- if the
first is from saving the script, what is the second, with the white space,
from? You can't expect Jmol to read data statements correctly with random
white space. That's asking too much.
Bob
On Thu, Apr 28, 2011 at 9:36 AM, Robert Hanson <[email protected]> wrote:
> thanks. Blank line in the data statement. I will track that down.
>
> On Thu, Apr 28, 2011 at 8:56 AM, Brian McMahon <[email protected]> wrote:
>
>> There is an apparent bug, or at least over-sensitivity in the way Jmol
>> reads in a state script for a small molecule which contains calculated
>> hydrogen bonds. I attach two scripts derived from Bob's sucrose example
>> ("load sucrose.cif {1 1 1}; hbonds calculate;"). The first is as written
>> out
>> by the signed applet with "Save script with state"; the second is
>> identical
>> except for some white-space changes (most notably the inclusion of a blank
>> line within the data "connect_atoms" block).
>>
>> The first loads and renders fine; the second causes the applet to crash
>> and the Java console shows the following error trace:
>>
>> Exception in thread "QueueThread0"
>> java.lang.ArrayIndexOutOfBoundsException: 0
>> at org.jmol.modelset.ModelSet.connect(Unknown Source)
>> at org.jmol.viewer.Viewer.connect(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.data(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.instructionDispatchLoop(Unknown
>> Source)
>> at org.jmol.script.ScriptEvaluator.runFunction(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.runFunction(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.function(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.instructionDispatchLoop(Unknown
>> Source)
>> at org.jmol.script.ScriptEvaluator.runFunction(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.runFunction(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.function(Unknown Source)
>> at org.jmol.script.ScriptEvaluator.instructionDispatchLoop(Unknown
>> Source)
>> at org.jmol.script.ScriptEvaluator.evaluateCompiledScript(Unknown
>> Source)
>> at org.jmol.viewer.Viewer.evalStringWaitStatus(Unknown Source)
>> at
>> org.jmol.viewer.ScriptManager$ScriptQueueRunnable.runScript(Unknown Source)
>> at
>> org.jmol.viewer.ScriptManager$ScriptQueueRunnable.runNextScript(Unknown
>> Source)
>> at org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(Unknown
>> Source)
>> at java.lang.Thread.run(Unknown Source
>>
>> Can this be easily fixed? (The IUCr enhanced figure toolkit saves scripts
>> is a manner that is not guaranteed to preserve whitespace.)
>>
>> The problem appears to have been present since at least Jmol 12.0.10, but
>> is
>> still present in 12.1.44.
>>
>> Thanks
>> Brian
>>
>>
>> ------------------------------------------------------------------------------
>> WhatsUp Gold - Download Free Network Management Software
>> The most intuitive, comprehensive, and cost-effective network
>> management toolset available today. Delivers lowest initial
>> acquisition cost and overall TCO of any competing solution.
>> http://p.sf.net/sfu/whatsupgold-sd
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> 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
>
--
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
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users