Skip to content

Atoms with 8+ neighbors don't draw symmetrically #220

@xavierholt

Description

@xavierholt

For example, the following SMILES:

N(C)(C)(C)(C)(C)(C)
N(C)(C)(C)(C)(C)(C)(C)
N(C)(C)(C)(C)(C)(C)(C)(C)
N(C)(C)(C)(C)(C)(C)(C)(C)(C)
N(C)(C)(C)(C)(C)(C)(C)(C)(C)(C)

Draw like this:

Image

After a little experimentation, I found that this seems to be an issue with overlap resolution. For example, the molecule with seven carbons (Mol2) draws as expected when overlapSensitivity is 0.27 or higher, but gets ugly at 0.26 and lower. Setting overlapResolutionIterations to zero doesn't change anything...

There might actually be two bugs in here - I'll have to investigate a little more:

  • The force-based layout algorithm might be behaving badly?
  • There's no way to completely disable overlap resolution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions