openmolecules.org

 
Home » DataWarrior » Functionality » Extensibility
Extensibility [message #254] Thu, 30 March 2017 18:08 Go to next message
andriy is currently offline  andriy
Messages: 4
Registered: March 2017
Junior Member
Hello,

is there any option to create a custom addon/plugin for Data Warrior?

My use case is:

1. User clicks a new added menu item "Open research database"
2. User enters login information
3. A list of custom searches is displayed to the user from the 3d party system
4. After selection of the search, a web service is called, which generated an sd-file
5. the generated sd-file is loaded into Data Warrior

Many thanks in advance !

Andriy
Re: Extensibility [message #257 is a reply to message #254] Thu, 30 March 2017 21:52 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 107
Registered: June 2014
Senior Member
Hi Andriy,

I already planned a plugin interface since some time, but because of other priorities didn't find the time yet. Nevertheless, if you would be willing to do some programming, there would be a few options:

- take the DataWarrior source code, add a custom menu item to the database menu, which opens a login dialog to your system and then, similar to the COD-database dialog, opens an own dialog with query options. The query could be sent through a REST or JDBC based connection and retrieves a result table with isomeric SMILES and data or opens an SD-File from a predefined location or network stream. Disadvantage: with every new DataWarrior version you would have to combine DataWarrior source with your custom source and recompile.

- you may create an independent application to define query features and prepare the result, e.g. as a Web application. Instead of retrieving the result the user receives a result URL like //http:someServer/?queryID=12435. The user launches DataWarrior, selects "Database->Retrieve Data From Custom URL..." and retrieves the result. If it includes structures as isomeric SMILES, then they are automatically recognized and shown.

- third option: contribute to a Plugin-API specification and implementation, which would then give you a maximum of flexibility. Even this would be an overseeable effort.

Best wishes, Thomas
Re: Extensibility [message #260 is a reply to message #257] Fri, 31 March 2017 09:05 Go to previous messageGo to next message
andriy is currently offline  andriy
Messages: 4
Registered: March 2017
Junior Member
Hi Thomas,

thank you for answering my question. I didn't know DW is an open source project. Is it really? The first option promises a quick win solution, but the third one would be beneficial for all. I think providing such a plugin interface would drastically increase the usage potential of DW.

Let's try with the 3d option, but I would like to keep the 1st open, as I'm not sure whether I will have enough time to accomplish it.

Can you provide the specification (what is already done till now) and the source code?
As to the second option, is there a way to start DW with the URL as a CMD parameter?
I'm not sure whether this is an option, because we host our application on Citrix and DW should run locally.

Many thanks again for your reply!

Andriy
Re: Extensibility [message #261 is a reply to message #260] Wed, 05 April 2017 07:59 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 107
Registered: June 2014
Senior Member
Hi Andriy,

the source code can be downloaded from the openmolecules.org website. The direct link of the current version is:
https://www.dropbox.com/s/334dnyddsh7ea3a/datawarriorSource4 52.tar.gz?dl=1

There is no specification. If you intend to start programming, then I suggest to call me at Actelion any time
to discuss the details. Currently, one can start DataWarrior from the command line, e.g. to process a macro,
bat you cannot pass an URL. This can be changed easily. However, one may create a macro that basically runs an
URL query and keeps the result Window open.

Kind regards,

Thomas
Re: Extensibility [message #262 is a reply to message #261] Wed, 05 April 2017 19:17 Go to previous messageGo to next message
andriy is currently offline  andriy
Messages: 4
Registered: March 2017
Junior Member
Hi Thomas,

thank you for the sources. What IDE do you use? This does not seem to be an Eclipse project (which I normally use).

I think, the easiest way to provide a common interface for 3d party integration would be:
- a new menu plugins
- plugins will be searched in a specific folder of DW
- a plugin would have to implement a particular interface allowing to launch it in a new window
- some kind of a callback for specific url as a data source for DW. The plugin will construct the right url with all the necessary parameters to retrieve the right subset of data

These are just my initial thoughts. I'll have to dig a bit deeper into the code and will make a proposal soon.

Best regards,
Andriy
Re: Extensibility [message #266 is a reply to message #262] Thu, 06 April 2017 09:16 Go to previous message
andriy is currently offline  andriy
Messages: 4
Registered: March 2017
Junior Member
hi Thomas, sorry to bother you again, can you please change my login. I was not aware that it will be displayed in the messages, and actually I do not really want my email to be indexed so easily by google. I could not find a way to change it or how to delete a profile.

Many thanks !

Andriy
Previous Topic: Combined marker labels in 2D plots
Goto Forum:
  


Current Time: Sat Apr 29 05:23:33 CEST 2017