Code Monkey home page Code Monkey logo

Comments (1)

rwst avatar rwst commented on July 18, 2024

From: Egon Willighagen [email protected]
Date: Fri, 9 Nov 2012 11:34:18 +0100
Message-ID: CAMPqvY8PZ0P4UuH8bcfjbU-2i+iQ-Gc6ddKyaGTAAGrta5Hwaw@mail.gmail.com
To: Joos Kiener [email protected]
Cc: "[email protected]" [email protected]
Subject: Re: [Cdk-user] layout disconnected structures in 1 AtomContainer

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

from jchempaint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.