|
From: Benn S. <ben...@gm...> - 2012-06-05 19:09:59
|
What is the best way to send scripting commands to Jmol from an external application? I am developing an application in C++ which will monitor for events from an XBox Kinect and use that information to control Jmol. I've seen appsync -- http://chemapps.stolaf.edu/jmol/docs/misc/appsync.txt -- and I can make it work from one Jmol instance to another, but how can I get the same results from my C++ application? I am using Jmol 12.2.27. I've tried a simple test using curl: Jmol console: $ sync -3000 Linux console: $ curl -H "Content-Type: application/json" -X POST -d '{"type":"command", "command":"rotate"}' localhost:3000 but nothing happens. What am I missing? And is there a better way? Regards, Benn Snyder |
|
From: A. H. <ang...@ua...> - 2012-06-05 19:33:49
|
Hey Benn, that sounds interesting! Have you read about Molecular Playground? They have set a Kinect interfaced to Jmol using MacOS software. www.molecularplayground.org |
|
From: Robert H. <ha...@st...> - 2012-06-05 20:55:21
|
exactly. And, Ben, we have it all set up in the SVN. Check Jmol 12.3 (trunk) org.molecularplayground.MPJmolApp.java. This is not what Angel is using, but it is the way to go. Basically the answer is to use sockets. Jmol can be set up as a listener via the sync command. It is very easy. Please let me work with you on this -- we can adapt the interface as needed. Are you doing this with the MS driver or third-party driver? Another option would be to use the SparshUI interface that we have installed, but the MolecularPlayground interface is what we're most interested in developing. You have seen the videos at You Tube (bobjmol) ? Bob On Tue, Jun 5, 2012 at 2:33 PM, Angel Herráez <ang...@ua...> wrote: > Hey Benn, that sounds interesting! > > Have you read about Molecular Playground? They have set a Kinect > interfaced to Jmol using MacOS software. > > www.molecularplayground.org > > > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > 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 |
|
From: Robert H. <ha...@st...> - 2012-06-05 21:01:50
|
Benn, also -- please start using Jmol trunk, not branch. You need to be developing using the up-to-date version that I can help you adapt as necessary. Jmol 12.2 is frozen, and there have been significant changes in the code since that. On Tue, Jun 5, 2012 at 3:55 PM, Robert Hanson <ha...@st...> wrote: > exactly. And, Ben, we have it all set up in the SVN. Check Jmol 12.3 > (trunk) org.molecularplayground.MPJmolApp.java. This is not what Angel is > using, but it is the way to go. Basically the answer is to use sockets. > Jmol can be set up as a listener via the sync command. It is very easy. > > Please let me work with you on this -- we can adapt the interface as > needed. Are you doing this with the MS driver or third-party driver? > > Another option would be to use the SparshUI interface that we have > installed, but the MolecularPlayground interface is what we're most > interested in developing. > > You have seen the videos at You Tube (bobjmol) ? > > Bob > > > > > > On Tue, Jun 5, 2012 at 2:33 PM, Angel Herráez <ang...@ua...>wrote: > >> Hey Benn, that sounds interesting! >> >> Have you read about Molecular Playground? They have set a Kinect >> interfaced to Jmol using MacOS software. >> >> www.molecularplayground.org >> >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> 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 > > > -- 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 |
|
From: Benn S. <ben...@gm...> - 2012-06-05 21:46:30
|
Bob, Alright, I have checked out trunk. I can get two instances of Jmol to communicate by doing Jmol1: $ sync -3000 Jmol2: $ sync 3000 'command' But I am stumped as to how to do this from C++. As for the Kinect, I am using OpenNI/NITE. I've seen what MolecularPlayground has done and we'd like to do something similar but hopefully more complex and in-depth. Regards, Benn |
|
From: Robert H. <ha...@st...> - 2012-06-06 11:26:17
|
Take a look at the MPJmolApp.java Basically you open a socket on port 3000 and start sending requests. I think you would set up Jmol with sync -3000 so that it is the server, not the client. On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <ben...@gm...> wrote: > Bob, > > Alright, I have checked out trunk. I can get two instances of Jmol to > communicate by doing > Jmol1: $ sync -3000 > Jmol2: $ sync 3000 'command' > > But I am stumped as to how to do this from C++. As for the Kinect, I am > using OpenNI/NITE. I've seen what MolecularPlayground has done and we'd > like to do something similar but hopefully more complex and in-depth. > > > Regards, > Benn > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > 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 |
|
From: Benn S. <ben...@gm...> - 2012-06-07 20:08:47
|
I was bashing my head against a wall most of yesterday until I figured out that JSON strings must be newline terminated for JsonNioService to accept them. Now it works - I can send JSON commands from my program to Jmol with sync on an arbitrary host and port using a little C socket lib I wrote. Now I'm working on a C++ wrapper class for the functionality I need. I'll post code soon, on Github or similar. Regards, Benn On Wed, Jun 6, 2012 at 7:25 AM, Robert Hanson <ha...@st...> wrote: > Take a look at the MPJmolApp.java > > Basically you open a socket on port 3000 and start sending requests. I > think you would set up Jmol with sync -3000 so that it is the server, not > the client. > > On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <ben...@gm...> wrote: > >> Bob, >> >> Alright, I have checked out trunk. I can get two instances of Jmol to >> communicate by doing >> Jmol1: $ sync -3000 >> Jmol2: $ sync 3000 'command' >> >> But I am stumped as to how to do this from C++. As for the Kinect, I am >> using OpenNI/NITE. I've seen what MolecularPlayground has done and we'd >> like to do something similar but hopefully more complex and in-depth. >> >> >> Regards, >> Benn >> >> >> ------------------------------------------------------------------------------ >> 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 >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> 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 > > > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > |
|
From: Robert H. <ha...@st...> - 2012-06-08 03:17:25
|
please consider posting it with us on SourceForge within Jmol. On Thu, Jun 7, 2012 at 3:08 PM, Benn Snyder <ben...@gm...> wrote: > I was bashing my head against a wall most of yesterday until I figured out > that JSON strings must be newline terminated for JsonNioService to accept > them. Now it works - I can send JSON commands from my program to Jmol with > sync on an arbitrary host and port using a little C socket lib I wrote. > Now I'm working on a C++ wrapper class for the functionality I need. I'll > post code soon, on Github or similar. > > > Regards, > Benn > > > > On Wed, Jun 6, 2012 at 7:25 AM, Robert Hanson <ha...@st...> wrote: > >> Take a look at the MPJmolApp.java >> >> Basically you open a socket on port 3000 and start sending requests. I >> think you would set up Jmol with sync -3000 so that it is the server, not >> the client. >> >> On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <ben...@gm...>wrote: >> >>> Bob, >>> >>> Alright, I have checked out trunk. I can get two instances of Jmol to >>> communicate by doing >>> Jmol1: $ sync -3000 >>> Jmol2: $ sync 3000 'command' >>> >>> But I am stumped as to how to do this from C++. As for the Kinect, I am >>> using OpenNI/NITE. I've seen what MolecularPlayground has done and we'd >>> like to do something similar but hopefully more complex and in-depth. >>> >>> >>> Regards, >>> Benn >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Jmol-developers mailing list >>> Jmo...@li... >>> 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 >> >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-developers >> >> > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > 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 |
|
From: Benn S. <ben...@gm...> - 2012-06-08 15:40:39
|
I published my C++ Jmol wrapper and C socket helpers on github, since they will be a part of the larger project which will be published there eventually. I've licensed them under the permissive MIT license and I welcome you to include them in Jmol however you see fit. https://github.com/piedar/molect The code which handles input from the Kinect is not yet published, but will probably be under GPL when it is. Now for a Jmol question: If I have a scene with multiple distinct molecules, how can I select an arbitrary molecule for rotation/translation? Regards, Benn On Thu, Jun 7, 2012 at 11:17 PM, Robert Hanson <ha...@st...> wrote: > please consider posting it with us on SourceForge within Jmol. > > On Thu, Jun 7, 2012 at 3:08 PM, Benn Snyder <ben...@gm...> wrote: > >> I was bashing my head against a wall most of yesterday until I figured >> out that JSON strings must be newline terminated for JsonNioService to >> accept them. Now it works - I can send JSON commands from my program to >> Jmol with sync on an arbitrary host and port using a little C socket lib I >> wrote. Now I'm working on a C++ wrapper class for the functionality I >> need. I'll post code soon, on Github or similar. >> >> >> Regards, >> Benn >> >> >> >> On Wed, Jun 6, 2012 at 7:25 AM, Robert Hanson <ha...@st...> wrote: >> >>> Take a look at the MPJmolApp.java >>> >>> Basically you open a socket on port 3000 and start sending requests. I >>> think you would set up Jmol with sync -3000 so that it is the server, not >>> the client. >>> >>> On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <ben...@gm...>wrote: >>> >>>> Bob, >>>> >>>> Alright, I have checked out trunk. I can get two instances of Jmol to >>>> communicate by doing >>>> Jmol1: $ sync -3000 >>>> Jmol2: $ sync 3000 'command' >>>> >>>> But I am stumped as to how to do this from C++. As for the Kinect, I am >>>> using OpenNI/NITE. I've seen what MolecularPlayground has done and we'd >>>> like to do something similar but hopefully more complex and in-depth. >>>> >>>> >>>> Regards, >>>> Benn >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Jmol-developers mailing list >>>> Jmo...@li... >>>> 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 >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Jmol-developers mailing list >>> Jmo...@li... >>> https://lists.sourceforge.net/lists/listinfo/jmol-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> 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 >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> 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 > > > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > |
|
From: Robert H. <ha...@st...> - 2012-06-09 14:52:24
|
On Fri, Jun 8, 2012 at 10:40 AM, Benn Snyder <ben...@gm...> wrote: > I published my C++ Jmol wrapper and C socket helpers on github, since they > will be a part of the larger project which will be published there > eventually. I've licensed them under the permissive MIT license and I > welcome you to include them in Jmol however you see fit. > https://github.com/piedar/molect > > Great. I'd love to do that. Or, I'd love if YOU did that. :) > The code which handles input from the Kinect is not yet published, but > will probably be under GPL when it is. > > > OK. LGPL would be my preference, but I'll understand if you prefer GPL. > Now for a Jmol question: > If I have a scene with multiple distinct molecules, how can I select an > arbitrary molecule for rotation/translation? > select molecule=1 select within(molecule, atomno=3) select within(molecule, C30 and 1.1) etc. rotate selected ... translate selected ... you might want to also check out the COMPARE command. It is very powerful. You can also set it up so that the user's mouse actions rotate only the molecule they have clicked. Bob > > > Regards, > Benn > > > > On Thu, Jun 7, 2012 at 11:17 PM, Robert Hanson <ha...@st...> wrote: > >> please consider posting it with us on SourceForge within Jmol. >> >> On Thu, Jun 7, 2012 at 3:08 PM, Benn Snyder <ben...@gm...>wrote: >> >>> I was bashing my head against a wall most of yesterday until I figured >>> out that JSON strings must be newline terminated for JsonNioService to >>> accept them. Now it works - I can send JSON commands from my program to >>> Jmol with sync on an arbitrary host and port using a little C socket lib I >>> wrote. Now I'm working on a C++ wrapper class for the functionality I >>> need. I'll post code soon, on Github or similar. >>> >>> >>> Regards, >>> Benn >>> >>> >>> >>> On Wed, Jun 6, 2012 at 7:25 AM, Robert Hanson <ha...@st...>wrote: >>> >>>> Take a look at the MPJmolApp.java >>>> >>>> Basically you open a socket on port 3000 and start sending requests. I >>>> think you would set up Jmol with sync -3000 so that it is the server, not >>>> the client. >>>> >>>> On Tue, Jun 5, 2012 at 4:46 PM, Benn Snyder <ben...@gm...>wrote: >>>> >>>>> Bob, >>>>> >>>>> Alright, I have checked out trunk. I can get two instances of Jmol to >>>>> communicate by doing >>>>> Jmol1: $ sync -3000 >>>>> Jmol2: $ sync 3000 'command' >>>>> >>>>> But I am stumped as to how to do this from C++. As for the Kinect, I >>>>> am >>>>> using OpenNI/NITE. I've seen what MolecularPlayground has done and >>>>> we'd >>>>> like to do something similar but hopefully more complex and in-depth. >>>>> >>>>> >>>>> Regards, >>>>> Benn >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> 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 >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Jmol-developers mailing list >>>>> Jmo...@li... >>>>> 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 >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Jmol-developers mailing list >>>> Jmo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jmol-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Jmol-developers mailing list >>> Jmo...@li... >>> 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 >> >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-developers >> >> > > > ------------------------------------------------------------------------------ > 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 > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > 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 |
|
From: Benn S. <ben...@gm...> - 2012-06-14 13:19:48
|
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.
Regards,
Benn
|
|
From: Robert H. <ha...@st...> - 2012-06-14 16:42:21
|
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?
Bob
On Thu, Jun 14, 2012 at 8:19 AM, Benn Snyder <ben...@gm...> 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.
>
>
> Regards,
> Benn
>
> ------------------------------------------------------------------------------
> 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
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-developers mailing list
> Jmo...@li...
> 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
|
|
From: Benn S. <ben...@gm...> - 2012-06-14 17:33:11
|
I think ActionManager.mouseAction() could do what I want. Is there a way
to call it from a script?
On Thu, Jun 14, 2012 at 9:19 AM, Benn Snyder <ben...@gm...> 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.
>
>
> Regards,
> Benn
|
|
From: Robert H. <ha...@st...> - 2012-06-14 22:09:52
|
no, no, no. Don't use that for this purpose. If you want to track mouse
events, you can do that via callbacks. Don't mess with ActionManager.
On Thu, Jun 14, 2012 at 12:33 PM, Benn Snyder <ben...@gm...> wrote:
> I think ActionManager.mouseAction() could do what I want. Is there a way
> to call it from a script?
>
>
>
> On Thu, Jun 14, 2012 at 9:19 AM, Benn Snyder <ben...@gm...>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.
>>
>>
>> Regards,
>> Benn
>
>
>
>
> ------------------------------------------------------------------------------
> 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
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-developers mailing list
> Jmo...@li...
> 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
|