Sorry for the delayed reply.. my e-mail got confused and I didn't notice until 
now.

obgrep -c 

http://openbabel.org/wiki/Obgrep

Hope that helps,
-Geoff

---
Prof. Geoffrey Hutchison
Department of Chemistry
University of Pittsburgh
tel: (412) 648-0492
email: geo...@pitt.edu
web: http://hutchison.chem.pitt.edu/

On Apr 11, 2014, at 6:14 PM, Nicolas Cheron <nicolas.cheron.bou...@gmail.com> 
wrote:

> 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 SMILES string 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
> 
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment 
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to