On Nov 8, 2010, at 5:55 PM, Chris Morley wrote:
> There is no list because plugin types and instances are discovered at 
> runtime when the plugin instances are constructed. I don't know enough 
> about how the Python bindings work, but maybe your difficulties are 
> connected with this.

Yes, that was the problem in me getting the data.

>>> import openbabel
>>> x = openbabel.OBConversion()
>>> openbabel.OBFingerprint.ListAsString("fingerprints")
'FP2    Indexes linear fragments up to 7 atoms.\nFP3    SMARTS patterns 
specified in the file patterns.txt\nFP4    SMARTS patterns specified in the 
file SMARTS_InteLigand.txt\nMACCS    SMARTS patterns specified in the file 
MACCS.txt\n'
>>> 

>>> q = openbabel.vectorString()
>>> openbabel.OBFingerprint.ListAsVector("fingerprints", None, q)
True
>>> for term in q:
...   print term
... 
FP2    Indexes linear fragments up to 7 atoms.
FP3    SMARTS patterns specified in the file patterns.txt
FP4    SMARTS patterns specified in the file SMARTS_InteLigand.txt
MACCS    SMARTS patterns specified in the file MACCS.txt
>>> 

I am willing to write documentation about this, about the list
of available plugins, the MACCS fingerprints, and how to handle
new fingerprint plugins.

Where does that go? Is it in the wiki or is there some other
better location now?

>> I tried looking for C++ code which uses ListAsVector but couldn't
>> find anything - not even a test.
> 
> There is certainly a shortage of tests.
> ListAsVector is used by OBPlugin::List which is called from obabel.cpp 
> (e.g. with parameters "fingerprints", "verbose".)

I am also willing to write tests which cover these. I have
a strong preference for writing those tests in Python. Is
there a recommendation of how to write those tests so they
fit into the OB test framework?

> I agree. I'll try to output the number of bits  and the data file 
> version (if applicable) in the second line of the description.

Thanks!


                                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