I don't know about reading but openbabel can certainly write out SD
files with R-groups as atomic aliases. Those SD files are then displayed
correctly in most molecular editors I've tested (Symyx Draw, MolSketch,
ChemDraw).

Igor



On Tue, 2011-06-14 at 16:22 -0400, Donald Keidel wrote:
> Greg,
> 
> I know all about teething.  My 8 month old is pushing out teeth almost 
> every 2 weeks or so.  I will continue to test this portion of the code 
> since it seems to be the only open source package wrapped in python that 
> does it mostly correct.  openbabel wont even read these SD files with 
> r-groups.
> 
> What I did to hack this was to add R1-R9 entries in 
> /rdkit/trunk/Code/GraphMol/atomic_data.cpp with atomic numbers 105-112.  
> I then use the set atomic number functionality in the python wrapped 
> code and change it to one of these series of numbers and then depict.  
> It is not a solid solution, but it works right now.
> 
> Thanks.
> 
> Don
> 
> On 06/14/2011 12:55 PM, Greg Landrum wrote:
> > Hi Don,
> >
> > On Mon, Jun 13, 2011 at 8:58 PM, Donald Keidel<donald.kei...@gmail.com>  
> > wrote:
> >> Have the following mol file:
> >>
> >>       RDKit          2D
> >>
> >>    7  6  0  0  0  0  0  0  0  0999 V2000
> >>      7.9102   -2.4208    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
> >>      6.4770 -2.4208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
> >>      5.0437 -2.4208    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
> >>      7.1916   -2.0137 0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
> >>      5.7583   -2.0137 0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
> >>      4.3292   -2.0137 0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
> >>      7.9148   -3.2458    0.0000 R#  0  0  0  0  0  0  0  0  0  0  0  0
> >>    2  4  1  0
> >>    3  5  1  0
> >>    4  1  1  0
> >>    5  2  1  0
> >>    6  3  1  0
> >>    1  7  1  0
> >> M  RGP  1   7   1
> >> V    7 *
> >> M  END
> >>
> >>
> >> When I use RDKit to depict the molecule I get a * in the image where the
> >> R-group is located.
> >>
> >> Is there a way to define what letter or letter with number combination
> >> is printed for the R-group?  A dictionary perhaps?  Ideally I would like
> >> the ability to depict R1 thru R9.
> > Here's what's going on currently:
> > By default the rendering code uses atom.GetSymbol() to determine what
> > should show up in the drawing.
> > atom.GetSymbol() using the atomic number, unless the atom has the
> > property "dummyLabel" set. If that property is set, it's used. It
> > should also be checking for the property "_MolFileRLabel".
> >
> > In looking at this I also discovered another problem : there's an
> > error if you call the depiction code using a molecule with R groups
> > and the kekulize argument is True.
> >
> > I've entered a bug about each of these things. They'll be fixed in the
> > next release (planned for end of the month).
> >
> > It's great (for the RDKit) that someone is really using the R group
> > stuff in mol files and reporting the problems; this is an
> > under-utilized/tested piece of the code, so I really appreciate it.
> > Apologies that you're having to suffer through the teething problems.
> >
> > Best,
> > -greg
> 
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to