wow, thanks very much Andrew!  i had seen  your words from 2008, "Most people
these days deal with Intel processors and don't have to worry about
different endian machines."
<http://www.dalkescientific.com/writings/diary/archive/2008/06/27/generating_fingerprints_with_openbabel.html>
  
and totally ignored this factor!

i think i prefer your first solution:

>>>    bits2 = ''.join([format(num,'032b')[::-1] for num in fp.fp])

but this is also an elegant hack:

>>> byte_fp = struct.pack("<" + "I"*32, *fp.fp)
>>> T = {chr(i): format(i, "08b")[::-1] for i in range(256)}
>>> bits1 == "".join(T[byte] for byte in byte_fp)

let me tell you the question driving my interest, and you can perhaps keep
me on the right path:  i want to consider breaking ligands with respect to
particular bonds into fragments, ala RECAP. then, i am exploring functions
of ligands' FRAGMENT similarities relative to the similarities between the
ligands directly.  perhaps there has been prior work on this issue?  

eg, if i have two fragments and they generate fingerprints `fp1` and `fp2`,
i will compute Tanimoto similarity ala:  `tsim = fp1 | fp2` .  and then
compare this over various "neighborhoods" near the broken bond in the
original ligands.  

i believe your answer implies that the bit strings provided by fp.bits are
the 'correct' natural ordering of bits to explore this?  

thanks again,  Rik





--
View this message in context: 
http://forums.openbabel.org/pybel-calcfp-mismatch-tp4658567p4658577.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to