Help: Python for Molecules/Ring Structures?

Andrew Dalke adalke at mindspring.com
Thu May 29 17:35:06 EDT 2003


entropy:
> I'm looking for a language/module which will make it relatively easy
> for me to identify ring structures in molecules.

Define "ring".  SSSR?  See "SSSR Considered Harmful" on OpenEye's
site, under www.eyesopen.com/oechem/doc/pyprog/pyprog.html

How many rings does cubane have?
     _______
    |\      :\
    |  \    :  \
    |    \ _:____\
    |     | :     |
    |.....|.:     |
     \    |  `.   |
       \  |    `. |
         \|_______|

> Been trying to do it in Perl and having a heckuva time...

That's because Perl is a poor language for complex data structures like
a molecule, compared to Python.  ;)

Brian Kelley:
> As the implementer of frowns, I'll give my two cents and say that
> OEChem/OElib is fantastic.  Blazingly fast, a good python interface and
> free for academic institutions.  Certainly best-in-class for protein
> structure PDB work.
>
> frowns is much slower but comes with source code and runs everywhere
> python does (even on my pda :) )

I figure I better chime in with my own two cents, so we can have four
responses from employees or ex-employees of the same company ;)

There are four available libraries for Python:
  Daylight - www.daylight.com ; commercial libraries for C/Fortran, with
     SWIGed wrappers by Roger Critchlow and a high-level ("Pythonic")
     interface called PyDaylight, by yours truly (www.dalkescientific.com).
     There's also a Perl interface roughly comparable to the SWIG version
     called DayPerl, originally developed by Alex Wong.

The PyDaylight interface, SWIG-level, looks like
  from daylight import Smiles
  mol = Smiles.smilin(smiles_string)
  for cycle in mol.cycles:
    ... do something with the cycle ...

  OELib - now called OpenBabel, available from sourceforge.net
     This was developed by OpenEye (www.eyesopen.com), with the
     Python interface done by Bob Tolbert, then at Boeringer-Ingelheim
     (and I probably spelled that pharma's name incorrectly)

  OEChem - OEChem's replacement for OELib, with the Python interface
     also done by Bob.  Unlike OELib, this is not open-sourced, but it is
     freely available to academics as a library.  I prefer OEChem over
OELib.
     However, the feel is very much that of C++ and not of Python.

     As Brian said, OEChem is the best chemical informatics toolkit for
     working with PDB structures.  Eg, it includes code to determine proper
     connectivity and bond type perception, starting with atom types and
     coordinates.  That's a very hard problem.

  Frowns - Brian Kelly's implementation, similar in API to PyDaylight.
     (And I contributed a couple of small modules  ;)  This is the only one
     which was designed for Python from the start, rather than as a wrapper
     layer on top of a C/C++ library.  Though PyDaylight feels very much
     like a true Python interface.  It's also the newest and least tested of
the
     various projects, though I think because a lot of it is in Python, many
     parts are much easier to understand.

And here's the scary part - all of these packages are non-trivially related
to Santa Fe, NM.  Which is where I live.

Oh, and I'm available for consulting based on any of these libraries.  ;)

                    Andrew Dalke
                    dalke at dalkescientific.com






More information about the Python-list mailing list