On Thu, Mar 8, 2012 at 6:04 PM, Nicholas Firth <nicholas.fi...@icr.ac.uk> wrote:
> Hi All,
> I've run into a few more problems with Fingerprinting, I'm trying to create
> a database of these fingerprints, I've tried a few different methods to
> write the fingerprints
>
> SparseIntVect<boost::uint32_t> *finger;
> mol=SmilesToMol(line);
> finger = MorganFingerprints::getFingerprint(*mol, 2);
> cout << finger.toString() << endl;
>
> Which returns
>
> Fingerprint.cpp:49: error: request for member ‘toString’ in ‘finger’, which
> is of non-class type ‘RDKit::SparseIntVect<unsigned int>*’
>
> Then as a fix i tried intreated over the entries in the vector however
> firstly I can't use the getLength function because of the same error above,
> and when I put in an arbitrary depth and managed to get some output, however
> it seemed only to output a huge amount of zero's

Uwe already pointed out the problem with pointer syntax versus
structure syntax (you want finger->toString()), but I think you may
want another change as well: getFingerprint() gives you a count-based
fingerprint, but you might want getFingerprintAsBitVect()
(http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MorganFingerprints.html#a1bf757d66784abf5a4ebf2c869be8261),
which returns a bit vector.

-greg

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel

Reply via email to