FYI, there's now a C++ bridge between RWMol and an OBMol, thanks to
the ever-resourceful Chris Morley.
Chris, I assume that your converter works both ways, i.e., someone
could write code from RDKit to use OBConversion and OBFormat to
write to anything Open Babel supports?
Cheers,
-Geoff
Begin forwarded message:
From: Chris Morley <c.mor...@dsl.pipex.com>
Date: September 25, 2007 4:57:38 PM EDT
To: openbabel-devel <openbabel-de...@lists.sourceforge.net>
Subject: [OpenBabel-Devel] 2D coordinate generation for OB provided
by RDKit
Reply-To: c.mor...@gaseq.co.uk
A very common request is for OpenBabel to have the capability to
add 2D
coordinates to atoms. Now with the development code you can do this
with
an option:
babel in.smi out.sdf --2D
The cheat is that it is RDKit which is doing the calculation. RDKit
http://www.rdkit.org
is a chemical toolkit with a BSD licence recently "discovered"
http://baoilleach.blogspot.com/2007/09/rdkit-not-just-yet-another.html
Its core is written in C++ (more modern and consistent than OB), which
allows easy interfacing to OpenBabel. A small piece of OB code
converts
an OBMol into RDKit's RWMol, runs the coordinate generation and sticks
the coordinates back on the OBMol atoms. The conversion lacks
stereochemistry at the moment but this should be easily added.
Building
on Windows with Visual Studio is not too difficult because RDKit is
modular, with project files to make static libraries for each
module. I
hope somebody can sort out the unix build.
Only a few of RDKit's modules are needed here, but, even so,
incorporating a chunk of another library is a bit unwieldy. This is
mitigated by a new OpenBabel plugin class OBOp. Its derived classes
can
be used as commandline options (as above), appear as checkboxes
etc. in
the GUI, and can be also be used from the API. Being plugins they
can be
added or removed without changing any code. If they are compiled into
dynamic libraries (*.obf on Windows) they can be added or removed
without recompiling by just moving a file.
A snapshot of the current development code compiled in this way in a
Windows installer is at
http://gaseq.co.uk/OB/openbabel2.2.0snapshotobf1_windows_installer.exe
It uses a modified commandline syntax: -O<output file> , which I'll
write another message on.
Chris
----------------------------------------------------------------------
---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
OpenBabel-Devel mailing list
openbabel-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel