Issue #51 resolved

Porting OPSIN to C++

Daniil Vodopian
created an issue

Hi!

I would like to use OPSIN in my C++ project. Unfortunately, linking a jar is out of the question, since the project must be in pure C/C++ by a requirement.

The only feasible solution I see is porting the whole OPSIN to C++. I write to ask if we could somehow collaborate on it, so that it would be easier for me to merge new features, and OPSIN would have a C++ fork.

Sincerely yours, Daniil Vodopian

Comments (5)

  1. Daniel Lowe repo owner

    I have a good idea which C++ project this is ;-)

    OPSIN is a fairly substantial amount of code, a few bits could be skipped in such a port e.g. SMILESWriter, but it would still be quite a big undertaking. As having a JVM sounds like a non-starter, and running OPSIN as a web service probably doesn't address your requirements (cf. example web service), the only other suggestion I can think of is Excelsior JET. I'm not certain whether Excelsior JET would address this issue (it does have a free trial) and if it did whether its licensing model is appropriate.

    I am happy to assist with questions about the purpose of functions, but realistically (as you can see from the outstanding issues on the bug tracker!) I don't really have the time to help directly. I can definitely see use cases for a C++ fork, although GPL licensing would prevent some of them.

  2. Daniil Vodopian reporter

    We are now in the process of evaluating all possible solutions, and porting OPSIN from Java to C++ word-fo-word is relatively not very hard. I studied the code a bit, and it is clear and notably close to the algorithms described in your 2011 paper. I really doubt there will be a need for a lot of help, but thank you for the offer, I really appreciate it.

    My proposal is less about the port, and more about its maintenance. If we port OPSIN to C++, we would also like to merge all feature OPSIN advancements. Vise versa, OPSIN would probably benefit from porting back our patches and improvements.

    The main issue for us is licensing. Since our project is (moving to) BSD, we can't reuse OPSIN or its parts without fully rewriting them. This is a big problem for a port since I can't use the XML configuration files which your parser uses.

    Do you think we could work around the problem with licensing? I am not a legal guru, but one solution could be to publish the XML parts under a more permissive license. Another way I see is you providing a special permission for us as for an approved port (that would imply it is a standalone library, not a part of a bigger project).

  3. Daniel Lowe repo owner

    I've obtained permission from the other contributors, and OPSIN is now licensed under the MIT license, hopefully this clears up any potential legal issues.

    In terms of keeping the port in sync, I would definitely be interested to backport bug fixes and relevant new features. As automated code conversion is imperfect I imagine for the most part moving code between the two projects will still be quite a manual process.

    As a by the by my thesis contains a more detailed/up to date description of the algorithms employed by OPSIN (https://www.repository.cam.ac.uk/handle/1810/244727). Practically speaking though the code itself is always going to be the defintive answer.

  4. Daniil Vodopian reporter

    Wonderful news on changing the license, thanks a lot!

    I'll resolve this issue, since any future collaboration will be in a form of us posting bugs to the OPSIN tracker (and possibly fixing them ;)

    P.S. A special thanks for linking your thesis. Depending on the situation, it may become quite indispensable.

  5. Log in to comment