Skip to content

Is there any way to leverage 3D coordinates? #122

@shubbey

Description

@shubbey

Hello again,
I realize that you aren't in active development of this library so I'm mainly asking to see if there is a way in the current system to take advantage of known 3D coordinates. I see in the code that they can be used as a fallback for when things fail, but I'm not seeing anything for using them to initialize a starting position for the 2D generation. As I noted in another thread, I'm debating moving from my in-house library which uses a very different method of "flattening" the 3D structure rather than generating it from scratch via connectivity info (which I assume is how coordgen works). My method is slower, but in some cases gives superior results. For example, if we look at:
208
The "flatten" method gives:
flatten
which is pretty straightfoward from the picture, since the molecule is almost planar already. But coordgen doesn't know this, and gives:
coordgen208

I did see some code that attempts to penalize bond crossings and such but I was not able to tweak it to get a superior picture. I get worse results if I give more complicated molecules, but my "flatten" method often gets those wrong too, and takes much longer. Other toolkits, eg JMol, SmilesDrawer, and especially CDKDepict do very well with this molecule and similar, but they are implemented in other languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions