Never mind. Problem solved! I ended up having to rearrange some statements
to make it work, shown as follows:
*my $obMol = Chemistry::OpenBabel::OBMol->new();my $obConversion =
Chemistry::OpenBabel::OBConversion->new();my $genOp =
Chemistry::OpenBabel::OBOp::FindType("gen3D");$obConversion->SetInAndOutFormats("inchi",
"sdf");foreach my $inchi (@inchis){ $obConversion->ReadString($obMol,
$inchi); $genOp->Do($obMol); print
$obConversion->WriteString($obMol);}*
By placing my line after calling the ReadString function (in bold), it
seems to have gotten rid of the "segmentation fault" message and started
generating data with 3D coordinates. Hope this helps others having the same
problem!
Wallace
On Thu, Nov 21, 2013 at 3:13 PM, Wallace Chan <walla...@umich.edu> wrote:
> I finally figured out how to call the the OBOp class with the following
> code:
>
> my $genOp = Chemistry::OpenBabel::OBOp::FindType("gen3d");
> $genOp->Do($obMol);
>
> However, this brought up a new problem, where I get the error message,
> "Segmentation fault." This appears to be an issue with the binding, if I'm
> not mistaken. The version of OpenBabel I'm using now is 2.2.3, not 2.3.2,
> and the system administrator on our cluster is hesitant in updating, as it
> is very troublesome. Has anyone experienced this error before? Would anyone
> know if this issue is resolved in later versions? Thank you very much for
> any insight.
>
>
> Wallace
>
>
> On Thu, Nov 14, 2013 at 4:30 PM, Geoffrey Hutchison <
> geoff.hutchi...@gmail.com> wrote:
>
>> > I'm using version 2.2.3 of Open Babel.
>>
>> I don't remember, but it's entirely possible OBOp is not included in the
>> Perl wrapper for that version. It's now over 4 years old.
>>
>> The latest version is 2.3.2:
>> http://openbabel.org/wiki/Install
>>
>> Hope that helps,
>> -Geoff
>
>
>
>
> --
> Wallace Chan
> Zhang Lab
> Department of Biological Chemistry
> University of Michigan
> walla...@umich.edu
>
--
Wallace Chan
Zhang Lab
Department of Biological Chemistry
University of Michigan
walla...@umich.edu
------------------------------------------------------------------------------
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