export a MACCS FP as a string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

export a MACCS FP as a string

Francois Berenger-2
Hello,

Using open babel, would it be possible to extract
a MACCS fingerprints as a string of 0s and 1s ?

Thanks,
F.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: export a MACCS FP as a string

Leonardo Lazzaro
On 2016-05-02 11:46, Francois Berenger wrote:

> Hello,
>
> Using open babel, would it be possible to extract
> a MACCS fingerprints as a string of 0s and 1s ?
>
> Thanks,
> F.
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly
> and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Hello,

how are you using open babel?

with python is pretty easy to do it, here is an example:

def fpt_to_binary(mol):
     # mol is an open babel molecule object
     fps=mol.calcfp(fptype='MACCS').bits
     temp=list('0' * 166)
     for item in fps:
         temp[item - 1]='1'

     bitstring=''.join(reversed(temp))

     return int(bitstring, 2)


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: export a MACCS FP as a string

Francois Berenger-2
On 05/03/2016 12:07 AM, Leonardo Lazzaro wrote:

> On 2016-05-02 11:46, Francois Berenger wrote:
>> Hello,
>>
>> Using open babel, would it be possible to extract
>> a MACCS fingerprints as a string of 0s and 1s ?
>>
>> Thanks,
>> F.
>>
>> ------------------------------------------------------------------------------
>>
>> Find and fix application performance issues faster with Applications
>> Manager
>> Applications Manager provides deep performance insights into multiple
>> tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
> Hello,
>
> how are you using open babel?

 From the command line usually.

> with python is pretty easy to do it, here is an example:

Thanks a lot for the example! I will test it and probably adapt it
to my needs.

> def fpt_to_binary(mol):
>      # mol is an open babel molecule object
>      fps=mol.calcfp(fptype='MACCS').bits
>      temp=list('0' * 166)
>      for item in fps:
>          temp[item - 1]='1'
>
>      bitstring=''.join(reversed(temp))
>
>      return int(bitstring, 2)
>

--
Regards,
Francois.
"When in doubt, use more types"

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss