Skip to content

Create unique atom names for Molecule object on creation #460

@jchodera

Description

@jchodera

Is your feature request related to a problem? Please describe.
Currently, when we create a Molecule, it's possible to construct one where the atoms lack unique names. This causes problems when we pass them to other tools that require unique atom names.

Describe the solution you'd like
When constructing a Molecule object from another molecule that lacks unique atom names, we should create unique atom names. We could also check that provided atom names are unique when constructing atom-by-atom, but this is less critical.

Describe alternatives you've considered
Forcing the user to always specify a molecule as input with unique atom names seems overly burdensome.

Another alternative could be to have a Molecule.normalize() or Molecule.validate() option that checked for unique atom names and enforced them as being unique at that time, and we would only call this before using or exporting the molecule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions