Geoff and Noel, Thank you for the speedy replies. I attached an example 2D SDF file.
Wallace On Fri, Nov 22, 2013 at 4:28 PM, Geoffrey Hutchison < geoff.hutchi...@gmail.com> wrote: > > my $filename = $id . '.sdf'; > > open (OUT, ">temp.sdf"); > > print OUT @sdfdata; > > close OUT; > > $obConversion->ReadFile($obMol, "temp.sdf”); > > This just seems weird. Even if you have a bunch of data, you don’t need to > save it to a file. There’s a ReadString() command too. We added these > functions for scripting languages that didn’t have an analogue to C++ > iostreams. > > > $genOp->Do($obMol); > > $obConversion->WriteFile($obMol, $filename); > > print "Generated $filename.\n"; > > `rm temp.sdf`; > > last; > > It’s been ages since I used Perl, so I don’t know if there are Perl > debuggers. You could insert a print statement after the Do() statement to > see if it completes, for example. > > > Here are some of the reasons why I think it doesn't work: > > 1.) It isn't possible to convert 2D SDF to 3D SDF > > 2.) I was successful using this converting InChI to 3D SDF, but maybe I > need to call a different class > > If you have questions about whether something works in your code, you can > test if it works from the command-line tools. So yes, converting from 2D to > 3D should work just fine. If not, that’s our bug. Can you send an example > 2D SDF file? > > Thanks, > -Geoff -- Wallace Chan Zhang Lab Department of Biological Chemistry University of Michigan walla...@umich.edu
CHEMBL100358.sdf
Description: Binary data
------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss