Hello, I am trying to count how many times a given moiety can be found in a database. My interest is not the list of the molecules containing this substructure, but how many times it can be found. Let's say that in my Database.smi file I have a biphenyl (c1ccc(cc1)c2ccccc2) and I want to count how many times phenyl is found. If I try "obabel Database.smi -O Output.smi -s "c1ccccc1"", it returns the biphenyl in Output.smi. However it is written only once whereas the phenyl moiety appears twice in it.
Is there a way with obabel to return the value I am looking for (2 in this case)? If the biphenyl is written twice, it is OK for me, at the end I can do a "wc -l" on Output.smi. If not, how can it be done with the API? Thank you for your help. Nicolas -- View this message in context: http://forums.openbabel.org/Couting-all-substructures-tp4657331.html Sent from the General discussion mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss