Chris, Seeing that it's you listed as the author of rxnformat.cpp would it be possible to include the fix I submitted here: https://sourceforge.net/tracker/?func=detail&aid=3537811&group_id=40728&atid=428740
It fixes the problem with segfaults for me and doesn't seem to break anything. It would be great to have it in 2.3.2. Best regards, Igor On Wed, 2012-06-20 at 16:51 -0400, Chris Morley wrote: > On 20/06/2012 15:37, Igor Filippov [Contr] wrote: > > Chris, > > > > Thank you for working on this! > > I do work on reaction recognition in OSRA - you can actually try for > > yourself the svn trunk release 905: > > > > svn co -r 905 https://osra.svn.sourceforge.net/svnroot/osra/trunk > > I would like to, but I would have to install at least 13 libraries, > including a compiler and deal with an openbabel static build. Too much > for an aging Windows user! > > > I have a few additional questions about reactions in OB, if I may: > > > > 1) The only two formats that I got working for OBReaction output are > > RSMI and CMLR. It would be great to output others, such as RXN, but I'm > > getting a segfault on the exact same code when I try to generate RXN > > instead of RSMI. Would you be interested in looking at the problem with > > RXN output? > I don't have any problem with reading or writing RXN. I hope the cause > of your trouble turns up. > > > > 2) Neither SetComment() nor SetData seem to do anything for either RSMI > > or CMLR output. It's not a huge deal but it would be nice to be able to > > save some additional information about the reaction in a way which is > > independent of the output format. > CMLR now outputs comment data from Reactions. RXN now outputs title and > comment data. > I don't know where a comment would go in Reaction SMILES. The text after > a space is regarded as the title. > > > > > 3) SetReversible doesn't seem to do anything for RSMI. I haven't tested > > on CMLR because frankly I haven't found anything which can read CMLR > > format. > That's a pity because there is a need for a flexible reaction format. > XML is easy to extend in a forward and backward compatible way. The > datafiles for the Mesmer project > (http://sourceforge.net/projects/mesmer) are based on CMLR and the > reaction data can be read by OB. > > I am also not sure it's possible to have a reversible reaction > > in RSMI - I don't know that much about the format. > > > > Best regards, > > Igor > > > > > > > > On Wed, 2012-06-20 at 07:28 -0400, Chris Morley wrote: > >> I've replaced the format chemdrawcdx.cpp with a new version that can > >> read *some* reactions as well as molecules. > >> > >> The format generates OBReaction objects when it can, which can be output > >> by rsmi, rxn, etc. Excess molecules are output as OBMol objects as > >> normal. The option -am generates only molecules, although most OB > >> molecule output formats will output the reactants and products if given > >> an OBReaction. > >> > >> The parsing of the cdx file is separated from the interpretation to a > >> greater extent than before, which should make it easier to do an XML > >> version (but cdxmlformat.cpp has not been changed yet). The CDX tree can > >> be displayed (-ad), in a similar way to Cambridgesoft's CDXHexDumper, > >> except that it contains human-readable names, obtained by parsing the > >> enums in the header file. > >> > >> The reaction parsing works only for cdx files which have single > >> reactions which are completely described in the file's data tree, as in > >> the attached file. This sadly is not the case for most cdx files where > >> additional heuristics based on the position of the arrow in the image is > >> necessary. I have been holding off committing these changes pending this > >> improvement, but have got round to it. Parsing an ordinary image would > >> be very similar, and I know Igor Filippov is working on this for OSRA, > >> so maybe this could be applied in cdx parsing. Rich Apodaca also seems > >> to have renewed interest, > >> http://depth-first.com/articles/2012/06/01/reading-and-rendering-chemdraw-cdx-files-in-javascript/ > >> . > >> > >> Chris > >> > > > > > > > > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel