Hi Chris,
You gave me the point. My task is just to extract all reactant and product
from the reaction. I have thought it is a nature feature for Open Babel to
convert from Reaction to Molecules because I have do it successfully against
CDX files.
By the way the RXN and CDX files are all exported by Chemdraw 8.0.
Thank you.
Charlie
On Wed, Nov 11, 2009 at 11:03 PM, Chris Morley <c.mor...@gaseq.co.uk> wrote:
> Charlie Zhu wrote:
>
> > I have tested a few RXN files on Openbabel GUI on Windows but 0 result
> > has been output. One of the RXN file is attached.
> > I temporarily have to use Regexp to parse the RXN format to SDF as C#
> > code as pasted below. It is even not trusted by myself.
> >
> > f = Regex.Replace(f, "\\$RXN(.*?)\\$MOL\\r?\\n", "",
> > RegexOptions.Singleline);
> > f = Regex.Replace(f, "\\$MOL", "$$$$$$$$",
> > RegexOptions.Singleline);
> > f = f + "$$$$\r\n";
> >
> > Anyone knows what's the matter?
>
> I think there are two issues here.
>
> RXN format seems to be working ok for converting to and from
> reactions. What you seem to want is to convert from rxn to sdf -
> converting from a reaction to molecules. This reasonable request is
> not currently supported, but I have just written some code that will
> allow it to happen from all reaction formats to most molecular
> formats. I will commit it to the development code soon.
>
> In the meantime in v2.2.3 you can already convert from a reaction in
> cml to molecules in sdf, say. So, in the GUI, convert from rxn to cml,
> Copy Output to Input (File menu) and convert to sdf.
>
> The other issue is that your example file contains two lines in a mol
> file part which are not interpreted by OpenBabel and are ignored. One
> is in the bond block:
> 4 F 4 9 17 35 53
>
> I don't understand it, but Marvin seems to like it.
>
> The other is:
> M ALS 4 4 F F Cl Br I
>
> an Atom List, which is for queries in the MDL documentation,
> equivalent, I think, to SMARTS [F,Cl,Br,I]. Marvin seems to use it as
> a Markush structure. Currently the target atom is converted to an
> unspecified * atom, which is compatible but too general. As far as I
> know, OpenBabel currently does not have any support for Markush
> structures, but it might be something of interest for the future.
>
> Chris
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss