Hi Greg, Thanks! It works! But, is that possible to fold the fingerprint to smaller size? np.zeros((1000000,2048)) still takes a lot of memory...
Best, Jing On Wed, Aug 26, 2015 at 11:02 PM, Greg Landrum <[email protected]> wrote: > > 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

