Dear Igor,

On Tue, Mar 25, 2008 at 6:55 PM, Igor Filippov [Contr]
<ig...@helix.nih.gov> wrote:
>
>  I'm considering using RDkit in my OSRA application
>  (http://osra.sourceforge.net), but after reading through the available
>  documentation and the mail list archives I'm still unclear where to
>  start as far as adding RDkit functionality to a C++ program.

Yes, there's not much sample code, as such, out there on for the C++
side of things. But that's a solvable problem.

The "sample" code that does exist is in the unit tests that are
scattered throughout the source tree. This exercises (almost) all of
the C++ functionality, but it's not really organized in a tutorial
manner, so it doesn't really help learn how to use the code.

>  I'm currently using OpenBabel library so the usage pattern of OB is what
>  I'm familiar with.
>  Would it be possible to see a short example (C++) that does the
>  following (something very simple, e.g C/C=C\C ):
>  - Assembles a molecular object out of atom and bond objects.An atom is
>  specified by an atomic number and charge. Bonds are defined by start and
>  end atoms and can have properties - single,double, triple, aromatic,
>  hash, wedge, up, and down.
>  - Creates  SMILES for this molecular object
>  - Finds a list of ring bonds
>  - Finds a list of rings
>  - Generates 2D coordinates

Up to this point the task is relatively straightforward (yes, I will
demonstrate in a subsequent email).

>  - Calculates the number of rotatable bonds

I would do this by defining a SMARTS pattern that recognizes rotatable
bonds and looking for matches to that SMARTS. This is also
straightforward, but one can always argue about the definition of
rotatable bond.

>  - Shows what header files one needs to include and what libraries need
>  to be linked to get a working executable.

This is where things start to get trickier. How would you like me to
express "what libraries need to be linked"? The RDKit is currently
built using boost.build, but it's certainly possible to link against
it using standard Makefiles. Integrating it into a large pre-existing
project like OSRA will be an interesting challenge. I think spending
some time on this is a worthwhile undertaking, because it will make
the code more useful to others, but I'm going to need help. So, Igor,
after I send the sample code (tonight or tomorrow morning European
time), I'll ask if you're willing to provide the "client" support on
build instructions/sample code.

By the way: OSRA looks quite nice. I would be happy if the RDKit stuff
could help in some way.

Best Regards,
-greg

Reply via email to