rendering reaction SMIRKS

32 views
Skip to first unread message

Kenneth (Karen) Karapetyan

unread,
May 30, 2012, 2:01:58 PM5/30/12
to indigo-...@googlegroups.com
Hi,

In Knime I see that "Query Reaction to Indigo" node is able to show
reaction SMIRKS images along with smirks (attached).
Is there an API I could use to get reaction images in Indigo? I see
that renderer only takes mol file as input.

Thanks,
Ken
smirksImages.gif

Mikhail Kozhevnikov

unread,
May 30, 2012, 5:54:46 PM5/30/12
to indigo-...@googlegroups.com, kara...@gmail.com
Hi Ken,

Isn't it loadReactionSmarts() you're looking for?

Cheers, 
Mikhail

Ken

unread,
Jun 1, 2012, 7:16:24 AM6/1/12
to indigo-...@googlegroups.com
yes, that is it. Thanks, Mikhail.

Seems like some reaction images are not rendering atom indexes properly for large dimensions that I use to zoom in into reaction thumbnail.

For example, the following code produces the attached image:

string smirks="[H:2][N+:1]([C,H:3])([C:4])[C:5].[F-,Cl-,Br-,I-:6]>>[N:1]([C,H:3])([C:4])[C:5].[H:2][F,Cl,Br,I:6]";
Indigo indigo_std = new Indigo();
IndigoObject obj_std = indigo_std.loadReactionSmarts(smirks);
IndigoRenderer renderer_std = new IndigoRenderer(indigo_std);
indigo_std.setOption("render-output-format", "png");
indigo_std.setOption("render-margins", 10, 10);
indigo_std.setOption("render-image-size", 1200, 300);
byte[] smirks_image = renderer_std.renderToBuffer(obj_std);
smirks_bad_image.gif

Mikhail Kozhevnikov

unread,
Jun 1, 2012, 8:41:08 AM6/1/12
to indigo-...@googlegroups.com, Kenneth Karapetyan
Hi Ken,

Yes, unfortunately we've still got trouble with large atom labels, such as atom lists. We'll look into it. 

NB: [F,Cl,Br,I:6] is considered an atom list, while [F-,Cl-,Br-,I-:6] is not, since attributes are not supported on particular atoms in a list. 

Regards,
Mikhail
Reply all
Reply to author
Forward
0 new messages