Hi RDKitters,

I might be being stupid here, but I'm trying to marry up the bitinfo from a 
hashed fingerprint to the actual fingerprint and I can't seem to do it.


from rdkit import Chem, DataStructs
from rdkit.Chem import rdMolDescriptors as rdMD
info = {}
mol = Chem.MolFromSmiles('CCCCC')
print rdMD.GetHashedMorganFingerprint(mol, radius=2, nBits = 1024, bitInfo = 
info).GetNonzeroElements()
print '\n',info



{33: 2, 294: 2, 591: 2, 80: 3, 887: 1, 794: 2, 381: 1}

{2246728737: ((0, 0), (4, 0)), 3542456614: ((0, 1), (4, 1)), 1685248591: ((1, 
2), (3, 2)), 2245384272: ((1, 0), (2, 0), (3, 0)), 1510461303: ((2, 1),), 
1173125914: ((1, 1), (3, 1)), 2738269565: ((2, 2),)}



The indices on the bitinfo appear to be the unhashed values. What I'd expect to 
see it something similar to the bit vector version of this code



info = {}
mol = Chem.MolFromSmiles('CCCCC')
print list(rdMD.GetMorganFingerprintAsBitVect(mol, radius=2, nBits = 1024, 
bitInfo = info).GetOnBits())
print '\n',info


[33, 80, 294, 381, 591, 794, 887]

{33: ((0, 0), (4, 0)), 294: ((0, 1), (4, 1)), 591: ((1, 2), (3, 2)), 80: ((1, 
0), (2, 0), (3, 0)), 887: ((2, 1),), 794: ((1, 1), (3, 1)), 381: ((2, 2),)}



I think I might be going about something the wrong way here so I'll explain 
what I'm doing. I'm using the output from GetHashedMorganFingerprint in machine 
learning and from this I'm trying to generate some of Sereina's lovely 
similarity maps. However I'm having issues hacking her code because of the 
bitInfo vectors don't match my FP's.

Thanks in advance.

Best,
Nick

Nicholas C. Firth | PhD Student | Cancer Therapeutics
The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey 
| SM2 5NG
T 020 8722 4033 | E nicholas.fi...@icr.ac.uk<mailto:nicholas.fi...@icr.ac.uk> | 
W www.icr.ac.uk<http://www.icr.ac.uk/> | Twitter 
@ICRnews<https://twitter.com/ICRnews>
Facebook 
www.facebook.com/theinstituteofcancerresearch<http://www.facebook.com/theinstituteofcancerresearch>
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company 
Limited by Guarantee, Registered in England under Company No. 534147 with its 
Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer and network.
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to