Hey,

thanks for the fast answering of my questions, I really didn't get the 
difference between selection and just picking and atom... I did what 
Robert suggested but unfortunately I encountered a different  problem 
now. I updatet  to Jmol 11.7 and now my whole CDK-Jmol connections broke 
down :(.

I think when I started this projected some month ago (was paused though) 
I found something  like a CDKJmolAdapter.class. My connection is pretty 
much this code with some changes for atomtyping and rewriting jmol 
molecules to cdk. First of all due to all the new abstract methods in 
JmolAdapter in the newer Version I had to switch to smarterJmolAdapter 
which doesn't seem to be a problem.

But the method I was using to add the molecule to the viewer is now 
deprecated and doesn't take CDK-molecules as arguments as it did before:

viewer.openClientFile(String,String,CDK-Molecule)

It asks for a AtomSetCollection

Is there a way to extract this AtomSetCollection from an CDK molecule 
object (is it equivalent to any cdk data sctucture for example? )or does 
something like a new adapter class already exist?

Greetings,

Alex


Robert Hanson schrieb:
> Alex, the distinction you need to make is between a Jmol atom 
> "selection" using the SELECT command and a mouse action to pick an 
> atom, which is a callback. You are watching for the select command. 
> What you want to do is implement org.jmol.api.JmolStatusListener. 
> Check out how this is done in Jmol.java. The two specific methods you 
> will want to implement are:
>
>     public boolean notifyEnabled(int type)
>     public void notifyCallback(int type, Object[] data)
>
>
> You register your status listener at Jmol viewer allocation time:
>
>     viewer = JmolViewer.allocateViewer(display, modelAdapter,
>         null, null, null, appletContext = commandOptions,
>         new MyStatusListener());
>
> Where MyStatusListener() implements JmolStatusListener.
>
> Referring to Jmol 11.7 here.
>
>
> Bob
>
>
> On Thu, Feb 26, 2009 at 7:23 AM, Alexander Klenner 
> <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Hi all,
>
>     is there a way to add something like the 'SelectionListener' to my
>     instance of the viewer ( I am using the viewer to visualize some
>     molecules that are in CDK Molecule representation)
>     that actually will react if I mouse-klick an atom in the viewer?
>
>     I tried the following but that won't do anything so far...
>
>      MyViewer.addSelectionListener(new JmolSelectionListener() {
>                 public void selectionChanged(BitSet selection) {
>                                   //do some nice stuff whenever atom is
>     klicked
>                               }
>
>            });
>
>     I do see the system outs from the StatusManager class that confirms,
>     that I did pick an atom.
>
>     Is there a way to do this or do I have to implement something by
>     myself?
>
>     Thanks for any help or suggestions,
>
>     Alex
>
>
>
>     --
>     Alexander Klenner, Dipl.-Bioinf.
>     Johann Wolfgang Goethe-University Frankfurt
>     Department of Biosciences
>     Siesmayerstrasse 70
>     D-60323 Frankfurt
>     Tel: +49 (0) 69 798 24879
>     Fax: +49 (0) 69 798 24880
>     [email protected]
>     <mailto:[email protected]>
>
>
>     
> ------------------------------------------------------------------------------
>     Open Source Business Conference (OSBC), March 24-25, 2009, San
>     Francisco, CA
>     -OSBC tackles the biggest issue in open source: Open Sourcing the
>     Enterprise
>     -Strategies to boost innovation and cut costs with open source
>     participation
>     -Receive a $600 discount off the registration fee with the source
>     code: SFAD
>     http://p.sf.net/sfu/XcvMzF8H
>     _______________________________________________
>     Jmol-users mailing list
>     [email protected]
>     <mailto:[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
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>   


-- 
Alexander Klenner, Dipl.-Bioinf.
Johann Wolfgang Goethe-University Frankfurt
Department of Biosciences
Siesmayerstrasse 70
D-60323 Frankfurt
Tel: +49 (0) 69 798 24879
Fax: +49 (0) 69 798 24880
[email protected]


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to