Atom has these public properties inherited from Point3fi:

  public int screenX;
  public int screenY;
  public int screenZ;

and you can get the atoms using

    Atom[] atoms = viewer.getModelSet().atoms;

because those are all public methods.

Does that do it for you?


On Thu, Jun 14, 2012 at 8:19 AM, Benn Snyder <> wrote:
I sent this question to jmol-users, but it's not showing up in the archive so I'm not sure it was received.  I apologize if it's a duplicate.

How do I select a particular molecule based on x and y position in the view window?  Perhaps by simulating a mouse click?  I've seen 'select within(distance, {x y z})' but that refers to internal 3D coordinates, not coordinates in the 2D view window.

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
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