On 3/11/10 7:44 AM, Andrew Voronkov wrote: > I have several questions regarding OpenBabel usage. > 1) Is it possible to compare two databases using obgrep, I mean if I have > not only SMARTS pattern, but for example > the datasets of ligands which I want to use against other dataset?
Are these literally databases, or just data files? A simple way to compare two databases is to generate the canonical SMILES of both, sort, and then compare. If you're on Linux or a Macintosh, you can use sort(1) and diff(1) along with babel's canonical SMILES: babel file1.sdf -o smi -xc | sort >file1.smi babel file2.sdf -o smi -xc | sort >file2.smi diff file1.smi file2.smi For really huge databases, a more complex but faster approach would be to use a hash table of canonical SMILES. Craig ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ OpenBabel-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
