Dear Evgueni,

On Mon, Apr 6, 2009 at 1:48 PM, Evgueni Kolossov <[email protected]> wrote:
>
> Thank you very much but in this case to compare we need somehow to covert it
> back when extracting from the database.
> How to do this?

If you mean convert it back into a bit vector, that's the second part
of my message below:
>> The various bit vector classes have constructors that accept these
>> strings:
>>  ExplicitBitVect bv2(pkl);

Alternatively, if you already have a bit vector and you want to
re-initialize it, you can use bv2.InitializeFromText

-greg

>
> 2009/4/6 Greg Landrum <[email protected]>
>>
>> Dear Evgueni,
>>
>> Fingerprints can be converted into a binary string using their
>> ToString() method:
>>  std::string pkl=bv.ToString();
>> The various bit vector classes have constructors that accept these
>> strings:
>>  ExplicitBitVect bv2(pkl);
>>
>> The strings from ToString() are suitable for storing in databases
>> (there's a lot of this in the python-based RDKit DbCLI code).
>> -greg
>>
>> On Mon, Apr 6, 2009 at 10:17 AM, Evgueni Kolossov <[email protected]>
>> wrote:
>> > Dear Greg,
>> >
>> > Can you suggest the way to write fingerprints into database? Say, we can
>> > have ExplicitBitVect *ev = RDKFingerprintMol(.......). Now I need write
>> > it
>> > into database (BLOB). So, do I need to convert ExplicitBitVect to binary
>> > stream or something?
>> >
>> > Regards,
>> > Evgueni
>> >
>> >
>> >
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>

Reply via email to