From: Noel O'B. <bao...@gm...> - 2008-03-21 20:29:03
|
Geoff - it might be a good idea to document these side-effects...I wasn't aware of this one. TJ, from O'person to another: >>> a = pybel.readstring("smi", "CCCC(=O)") >>> a.data.keys() [] >>> print a.write("can") CCCC=O >>> a.data.keys() ['PartialCharges', 'canonical order'] >>> a.data['canonical order'] '1 2 3 4 5' >>> a = pybel.readstring("smi", "C(=O)CCC") >>> a.data.keys() [] >>> print a.write("can") >>> print b CCCC=O >>> a.data['canonical order'] '5 4 3 1 2' If you have any further questions, please let us know. - Noel On 21/03/2008, Geoffrey Hutchison <ge...@ge...> wrote: > > On Mar 21, 2008, at 2:05 PM, TJ O'Donnell wrote: > > > Is it possible to get the canonical atom re-ordering, > > say as an int vector, after conversion to canonical smiles? > > > As a matter of fact, yes. The current SVN trunk has this feature -- > after conversion to canonical SMILES, the ordering is available as an > OBPairData called "Canonical Atom Order" > > For a C++ example, of this, check out tools/obfragment.cpp. > > This should be accessible from Python directly, although I defer to > Noel on the Pybel syntax for this. > > Cheers, > -Geoff > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |