-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 24 February 2004 09:56, Joerg K. Wegner wrote:
> your previews for the Jmol 10 release are really promising, seems that
> there is a hard-working Jmol developer team :-)
>
> O.k., let's go into detail. I'm definitely interested in a Jmol<->JOELib
> connection. Which functionalities should be available and which
> interface do we both need ? Please go into source code details, because
> i'm not too familiar with your code !

You need to look at the CDKPlugin API:

org.openscience.cdk.applications.plugin.CDKPluginInterface:

public interface CDKPluginInterface {

    /**
     * Should return the name of the plugin.
     */
    public String getName();
    
    /**
     * Should return the version of the implemented plugin API. The plugin
     * manager will only load plugins with a compatible API version.
     */
    public String getAPIVersion();
    
    /**
     * Should return the version of the plugin. This can be used to see if
     * a plugin has a newer version.
     */
    public String getPluginVersion();
    
    /**
     * Should return a JPanel that provides access to the functionality
     * of this plugin.
     */
    public JPanel getPluginPanel();
    
    /**
     * Should return a JPanel that provides access to the configuration
     * of this plugin.
     */
    public JPanel getPluginConfigPanel();
    
    /**
     * Should return a JMenuItem that provides menu access to functionality
     * of this plugin.
     */
    public JMenu getMenu();
    
    /**
     * Sets the interface to the application.
     */
    public void setEditBus(CDKEditBus editBus);

    /**
     * Sets the directory where the plugin's preferences can be found.
     */
    public void setPropertyDirectory(String directory);

    /**
     * Initializes the plugin.
     */
    public void start();

    /**
     * Closes down the plugin.
     */
    public void stop();
    
    /**
     * Method called when the ChemObject is changed.
     */
    public void stateChanged(ChemObjectChangeEvent e);
}

Just implement this interface and you're fine. Jmol has implemented at this 
moment only the set methods, but the get methods will follow shortly...

The plugin interacts with the application using the CDKEditBus:

public interface CDKEditBus {

    public void showChemFile(ChemFile file);
    public void showChemModel(ChemModel model);

    public ChemModel getChemModel();
    public ChemFile getChemFile();
    
}

which is very simplistic at this moment, and will likely evolve over time...

Have a look through the source codes of the current plugins in the cdk 
cdk-plugin module:

cvs -Dyouknowwhat checkout cdk-plugins

> It would be interesting if people can draw a structure and people can
> get/visualize the following things:
>
> - JMol molecule <--> Getting force-filed minimized structure from the
> JOELib-Ghemical interface (only Linux using IBM's virtual machine).
> Checking operation system and installation is not too difficult.
> - JMol molecule <--> Getting descriptors, e.g. MR, PSA, LogP, MW, ...
> for complex transformation rules i recommend to use the JOELib command
> line, e.g. for RDF and the rest.
> - JMol molecule and SMARTS expression <--> JOELib return atom indixes of
> unique or not unique SMARTS matching
> - JMol molecule SET <--> JOELib data mining connection to Weka ? can be
> possible only if multiple molecules can transferred to JOELib

This sounds like 4 different plugins.

> General:
> - Where should the GUI elements be defined ?

As you can see in the interface, a plugin defines it GUI with the method
CDKPluginInterface.getPluginPanel()...

> - Can you support me with a
>     1. draw molecule

drawn molecule? Use: CDKEditBus.getChemModel()

The ChemModel API is at:

http://cdk.sourceforge.net/api/org/openscience/cdk/ChemModel.html

Since these are CDK classes you can simply use the cdk.libio.joelib.Convertor
class...

>     2. submit interface

the a new molecule to be drawn? CDKEditBus.setChemModel()

>     3. get result set (format ?, e.g. using JOELib GenericData framework)
> example ? Please use your preffered mechanism.

I can't really follow your questions... please elaborate...

> Then i will be able to implement the functionality for your Jmol-JOELib
> interface definition !

Ok, let's email more and converge...

> I think it's not an easy task, but we should start anywhere ... step by
> step ... this could be a really promising connection.

Using the plugin API it has a very well defined interface, and it is 
reasonably straight forward... We'll work it out...

Egon

- -- 
[EMAIL PROTECTED]
PhD on Molecular Representation in Chemometrics
Nijmegen University
http://www.cac.sci.kun.nl/people/egonw/
GPG: 1024D/D6336BA6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (SunOS)

iD8DBQFAOxWPd9R8I9Yza6YRAlJ2AJ96ssPyZB+GvuQFGdGMjdhLVkaQ6wCfc2cV
HpFJRqe4i6jcWRsyPL9Fhng=
=AGy2
-----END PGP SIGNATURE-----



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to