Hmm if I don't use loadInline then I can't immediately retrieve the
molecule from the viewer.

Is there a callback mechanism for the loading method you recommended, or a
way to sleep the current thread until that thread has completed?

David


On 6 February 2013 23:28, N David Brown <hubd...@gmail.com> wrote:

Sorry - mol is a JmolMolecule instance retrieved from a Viewer instance
> like so: myViewer.getModelSet().getMolecules[i].
>
> Thanks for the tip Bob. So if I call a load command of that format using
> AppConsole#execute it will be thread-safe?
>
> David
>
> On 6 February 2013 22:52, Robert Hanson <hans...@stolaf.edu> wrote:
>
>> I have no idea. What's "mol" ?
>>
>> By the way, loadInLine is not thread-safe. It is much better to use a
>> script and just enter the data as:
>>
>> load DATA "model mydata"
>> .....mol data here...
>> end "model mydata" .... more load parameters here....
>>
>>
>>
>> On Wed, Feb 6, 2013 at 4:17 PM, N David Brown <hubd...@gmail.com> wrote:
>>
>>> After importing a structure of N atoms from molfile format using
>>> Viewer#loadInline:
>>>
>>> System.out.println(mol.atomCount); // 0
>>> System.out.println(mol.nodes.length); // N
>>>
>>> Why is atomCount zero?
>>>
>>> David
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Free Next-Gen Firewall Hardware Offer
>>> Buy your Sophos next-gen firewall before the end March 2013
>>> and get the hardware for free! Learn more.
>>> http://p.sf.net/sfu/sophos-d2d-feb
>>> _______________________________________________
>>> Jmol-developers mailing list
>>> Jmol-developers@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>>>
>>>
>>
>>
>> --
>> Robert M. Hanson
>> Larson-Anderson Professor of Chemistry
>> Chair, Chemistry Department
>> St. Olaf College
>> Northfield, MN
>> http://www.stolaf.edu/people/hansonr
>>
>>
>> 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
>>
>>
>
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to