From: John Stone (
Date: Mon Nov 24 2008 - 10:22:47 CST

  Thanks for sending the patch. Have you done significant testing
with this patch and current revs of openbabel? I'm just trying to
gauge how much testing will be required before I can safely apply this
patch to the CVS tree, independent of any platform portability issues,
which I can certainly take care of.

  John Stone

On Thu, Nov 20, 2008 at 12:07:17PM +0100, FX wrote:
> The current list of babel/openbabel formats in the vmd importer plugin
> is hardcoded, and corresponds to either babel 1.6 or openbabel
> 1.100.2. Recent openbabel releases support many more formats. This
> patch allows the plugin to actually ask openbabel itself what formats
> it can read (the command is "babel -L formats read", supported since
> at least babel 2.2.0). On my build, it adds 75 formats to the list!
> Some notes:
> -- built and tested on MACOSX86 only
> -- the code is rather crude C, but so is the rest of the plugin
> -- old behaviour can be retained by undefined
> USE_OPENBABEL_AUTODETECT and defining either USE_BABEL_1_6 or
> USE_OPENBABEL_1_100_2 at the top of the file
> -- the code actually launching the conversion and reading the
> results is untouched

> Best regards,
> FX
> PS: for some reason, on my own build, I kept getting an error about
> VMDBABELBIN being undefined (though it never happens with the official
> or alpha packages form the website and Biocore); this is the reason
> for the following change:
> babelbin = getenv("VMDBABELBIN");
> - if (!babelbin) {
> - fprintf(stderr, "Babel plugin needs VMDBABELBIN environment
> variable\n"
> - "to point to location of Babel executable\n");
> + if (!babelbin)
> + babelbin = "babel";
> I suppose this is not actually needed if you get your build right, but
> as I can't test, I let it in.

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078