I'm not sure what's gong on. Can you file a bug report with an example
molecule and Perl code?

- Noel

On 22 March 2011 15:11, Igor Filippov [Contr] <filipp...@mail.nih.gov> wrote:
> Noel,
>
> Thank you. I'm getting the following error though:
>
> TypeError in method 'toSetData', argument 1 of type
> 'OpenBabel::OBGenericData *'
>
> Does it mean that the argument should not be an object returned by
> GetData()? What should it be then?
>
> Best regards,
> Igor
>
> On Tue, 2011-03-22 at 05:26 -0400, Noel O'Boyle wrote:
>> You need to cast it to the specific subclass first. Try calling
>> $newad = toSetData($ad)
>> and then
>> if ($newad && $newad->GetAlias() eq "Xx")
>>
>> - Noel
>>
>> On 21 March 2011 15:06, Igor Filippov [Contr] <filipp...@mail.nih.gov> wrote:
>> > Dear Colleagues,
>> >
>> > I need to implement in Perl a procedure which is C++ looks like the
>> > following:
>> > ....
>> > AliasData *ad;
>> > ad = (AliasData *) a->GetData(OBGenericDataType::SetData);
>> > if (ad != NULL && ad->GetAlias() == "Xx")
>> > ....
>> >
>> > This is what I have at the moment and it does not work unfortunately:
>> > ....
>> > $ad=$atom->GetData($Chemistry::OpenBabel::OBGenericDataType::SetData);
>> > if ($ad && $ad->GetAlias() eq "Xx")
>> > ....
>> >
>> > It doesn't seem to work even if I replace
>> > $Chemistry::OpenBabel::OBGenericDataType::SetData
>> > with it's numerical value - 23.
>> >
>> > Any recommendations will be most welcome!
>> > Igor
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Colocation vs. Managed Hosting
>> > A question and answer guide to determining the best fit
>> > for your organization - today and in the future.
>> > http://p.sf.net/sfu/internap-sfd2d
>> > _______________________________________________
>> > OpenBabel-discuss mailing list
>> > OpenBabel-discuss@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> >
>
>
>

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to