Hi Joos,

I think I have posted this code before on a similar question.

https://ambit.svn.sourceforge.net/svnroot/ambit/trunk/ambit2-all/ambit2-rendering/src/main/java/ambit2/rendering/CompoundImageTools.java


It will render any set of disconnected structures inside a single atom
container. Online demo how it works at
http://apps.ideaconsult.net:8080/ambit2/depict/cdk?search=CCCCCC.CCC.CC

The jar is ambit2-rendering, available at Maven repository
http://ambit.uni-plovdiv.bg:8083/nexus/index.html#nexus-search;quick~ambit2-rendering
or at sourceforge
http://sourceforge.net/projects/ambit/files/Ambit2/AMBIT_modules/2.4.8/

Best regards,
Nina

On 9 November 2012 12:34, Egon Willighagen <[email protected]>wrote:

> Hi Joos,
>
> On Fri, Nov 9, 2012 at 11:19 AM, Joos Kiener <[email protected]> wrote:
> > The issue is to create and sdf file were all the disconnected structures
> are
> > nicely displayed. Running StructureDiagrammGenerator only works for
> > connected structures and GeometryTools also don't seem to offer a out of
> the
> > box solution.
> >
> > Is there any tool in cdk that can do this?
>
> The ConnectivityTool can be used to split disconnected structures into
> a list of "molecules".
>
> Because some discussion in the bug tracker came up around this too,
> let's set some definitions.
> A 'molecule' is a chemical graph, where each atom can be reached from
> another atom via one or more bonds.
> A salt is a disconnected structure, consisting of two or more 'molecules'.
>
> The SDG tool in the CDK is an algorithm to layout 'molecules', and
> thus fails on salts. That is not a bug, just a limitation of the
> algorithm.
>
> To work around this, you can split up the structure first, then do SDG
> on each molecule.
>
> Now, to combine that again, you need to do some tricks, one of which
> is to decide how you would put them in one diagram. For example as a
> table of structures. We used to have code for that in the CDK, and I
> used that in the past to lay out multiple reactions.
>
> That said, I love an algorithm in the CDK to lay out salts... if we
> introduce a dative bond concept in 'master', then the current SDG
> algorithm may actually work. We do not have such a bond right now, and
> it will require code updated all over the place, but I'm happy to see
> that. Then, we'd only need an algorithm to take a 'salt' and connect
> positive atoms with negative atoms... (there may be multiple charges,
> etc...)
>
> OK, let me update the atom type perception in master first, and then I
> will try to look at the dative bond idea.
>
> Egon
>
>
> --
> Dr E.L. Willighagen
> Postdoctoral Researcher
> Department of Bioinformatics - BiGCaT
> Maastricht University (http://www.bigcat.unimaas.nl/)
> Homepage: http://egonw.github.com/
> LinkedIn: http://se.linkedin.com/in/egonw
> Blog: http://chem-bla-ics.blogspot.com/
> PubList: http://www.citeulike.org/user/egonw/tag/papers
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> Cdk-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to