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?


On 6 February 2013 23:28, N David Brown <> 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?


On 6 February 2013 22:52, Robert Hanson <> 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 <> 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?


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.
Jmol-developers mailing list

Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN

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