On Sat, May 11, 2013 at 5:24 PM, Jeff Janes <jeff.ja...@gmail.com> wrote:
>
> I am using perl with Chemistry::OpenBabel for canonicalizing some smiles
> strings, using this construct:
>
> $obConversion->SetInAndOutFormats("smi", "can")
>
> Is there something I can change the "can" to so that it will strip out the
> stereochemistry?
>
$obConversion->SetOptions("i", OBConversion::OUTOPTIONS);
That may not be the exact right perl syntax for the
OBConversion::OUTOPTIONS (I mostly use C++ for OpenBabel stuff).
You can discover these options with "obabel -H can".
Write Options e.g. -xt
a Output atomclass like [C:2], if available
h Output explicit hydrogens as such
i Do not include isotopic or chiral markings
n No molecule name
r Radicals lower case eg ethyl is Cc
t Molecule name only
F <atom numbers> Generate Canonical SMILES for a fragment
The atom numbers should be specified like "1 2 4 7".
f <atomno> Specify the first atom
This atom will be used to begin the SMILES string.
l <atomno> Specify the last atom
The output will be rearranged so that any additional
SMILES added to the end will be attached to this atom.
See the :ref:`SMILES_format` for more information.
Craig
> Thanks,
>
> Jeff
>
> Full demo program:
>
> use strict;
> use Chemistry::OpenBabel;
> my $obConversion = new Chemistry::OpenBabel::OBConversion or die $!;
> $obConversion->SetInAndOutFormats("smi", "can") or die $!;
> my $obMol = new Chemistry::OpenBabel::OBMol;
> $obConversion->ReadString($obMol, 'C/C=C\C') or die $!;
> print $obConversion->WriteString($obMol);
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss