> In C++
> std::string OBPlugin::ListAsString
>               (const char* PluginID, const char* param=NULL);
> gives similar functionality, but I don't know whether it is exposed in 
> Python.

I've been trying to figure out how to use it.

>>> openbabel.OBFingerprint.ListAsString("Fingerprint")
'Fingerprint is not a recognized plugin type. Those with instances of sub-types 
loaded are:\n'
>>> openbabel.OBFingerprint.ListAsString("OBFingerprint")
'OBFingerprint is not a recognized plugin type. Those with instances of 
sub-types loaded are:\n'
>>> openbabel.OBFingerprint.ListAsString("fp")
'fp is not a recognized plugin type. Those with instances of sub-types loaded 
are:\n'
>>> openbabel.OBFingerprint.ListAsString("obfp")
'obfp is not a recognized plugin type. Those with instances of sub-types loaded 
are:\n'
>>> openbabel.OBFingerprint.ListAsString("PatternFP")
'PatternFP is not a recognized plugin type. Those with instances of sub-types 
loaded are:\n'
>>> openbabel.OBFingerprint.ListAsString("fingerprints")
'fingerprints is not a recognized plugin type. Those with instances of 
sub-types loaded are:\n'
>>> openbabel.OBFingerprint.ListAsString("format")
'format is not a recognized plugin type. Those with instances of sub-types 
loaded are:\n'
>>> openbabel.OBFingerprint.ListAsString("formats")
'formats is not a recognized plugin type. Those with instances of sub-types 
loaded are:\n'
>>>


It seems I'm doing wrong. I can't find where the code uses ListAsString and I 
can't find the list of supported PluginIDs. I did find

src/GUI/OBGUI.cpp:
 OBPlugin::ListAsVector(NULL, NULL, topvec);//get 'formats', 'fingerprints', etc

but you can see that neither 'formats' nor 'fingerprints' works. I tried 
looking for C++ code which uses ListAsVector but couldn't find anything - not 
even a test.
 

I also can't get the Python interface to ListAsVector working

>>> openbabel.OBFingerprint.ListAsVector("formats", None, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid null reference in method 'OBPlugin_ListAsVector', argument 
3 of type 'std::vector< std::string,std::allocator< std::string > > &'
>>> 

>>> q = openbabel.vectorString()
>>> openbabel.OBFingerprint.ListAsVector("formats", None, q)
False
>>> list(q)
[]
>>> 

Any advice?

>> figure out how many bits they generate? For example, I don't see
>> any way to find that FP2 generates 1021 bits.
> The size of the vector returned by GetFingerprint() gives an 
> indication (rounded up to a power of 2).

I did find that, but if someone's using the MACCS keys I think
they would expect a fingerprint of size 166 bits, and not something
which is 256 bits, of which the last 90 bits are always 0.

There are a number of scoring functions which are based on the fingerprint 
length. A quick scan of 

http://www.daylight.com/dayhtml/doc/theory/theory.finger.html

lists Euclidian, Forbes, Hamman, Manhattan, Matching, and Russell-Rao as ones 
which depend on the total length (they have 'a+b+c+d' which is n, or the total 
number of bits).

It doesn't seem right to use the implementation size (which is
a power of 2) rather than the specification size (which for
MACCS is 166 bits).



                                Andrew
                                da...@dalkescientific.com



------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to