On 4 July 2013 08:16, <[email protected]> wrote:
> from rdkit import Chem
> from rdkit.Chem import MACCSkeys
>
>
> nat = Chem.SDMolSupplier("nat.sdf")
> fps = [MACCSkeys.GenMACCSkeys(x) for x in nat]
> fp = DataStructs.FingerprintSimilarity(fps[0], fps[89])
> print fp
>
Welcome to the RDKit mailing lists!
As usual, the devil is in the detail. You are using a lower case 'k' for
keys instead of an upper case one (i.e. should be 'MACCSkeys.GenMACCSKeys'
and not 'MACCSkeys.GenMACCSkeys'). Python being case-sensitive it barfs on
things like these.
This works:
from rdkit import Chem
from rdkit.Chem import MACCSkeys
from rdkit import DataStructs
fps = [MACCSkeys.GenMACCSKeys(x) for x in nat]
DataStructs.FingerprintSimilarity(fps[0],fps[1])
As a newbie there is a fantastic resource Greg put together, The RDKit
Bible - http://www.rdkit.org/RDKit_Docs.current.pdf - what you want is on
page 29
Cheers,
JP
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss