Skip to content

Hiding formal charges #418

@horgerj

Description

@horgerj

I'm using RDKit.js to generate semi-randomized structures for my organic chemistry students, to generate practice problems for filling in lone pairs and/or formal charges to structures (assuming filled octets). Currently, this requires using SMILES strings that have been tweaked to generate radicals, which can be hidden by setting includeRadicals to false. This works great for generating structures for anions, but there's no corresponding trick for cations:

Screenshot 2023-11-15 at 10-24-32 RDKit js - JavaScript Example

Since radicals can be hidden, would it be possible to also add an option to hide formal charges (hideFormalCharge, perhaps) as well? That way, the input SMILES wouldn't need any tricks to display with no charges (for example, like this):

Screenshot 2023-11-15 at 10-26-15 RDKit js - JavaScript Example

I realize this is somewhat of a niche use case, but it would be very helpful! I appreciate the consideration.

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