On Thu, Aug 27, 2015 at 3:00 AM, Jing Lu <[email protected]> wrote:

>
> So, I wonder is there any way to convert fingerprint to a numpy vector?
>

Indeed there is:

In [11]: from rdkit import Chem

In [12]: from rdkit import DataStructs

In [13]: import numpy

In [14]: m =Chem.MolFromSmiles('C1CCC1')

In [15]: fp = Chem.RDKFingerprint(m)

In [16]: fpa = numpy.zeros((len(fp),),numpy.double)

In [17]: DataStructs.ConvertToNumpyArray(fp,fpa)


Best,
-greg
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to