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

Reply via email to