Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling output of dative bonds to SMILES #7384

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

greglandrum
Copy link
Member

@greglandrum greglandrum commented Apr 23, 2024

Also adds the option to write dative bonds to SMILES as coordinate bonds.

Fixes #7372

Still needs:

  • add support to SMARTS/CXSMARTS
  • add support to reaction SMILES/SMARTS writers

@greglandrum greglandrum added this to the 2024_03_2 milestone Apr 23, 2024
@greglandrum greglandrum marked this pull request as draft April 23, 2024 13:48
@johnmay
Copy link
Contributor

johnmay commented Apr 26, 2024

Why not off by default?

@greglandrum
Copy link
Member Author

Why not off by default?

Firstly because that would be serious change in behavior. Secondly because I believe that it, like the other SMILES and SMARTS extensions the RDKit supports, are valuable and useful additions.

@greglandrum greglandrum requested a review from ptosco April 27, 2024 05:35
@greglandrum greglandrum marked this pull request as ready for review April 27, 2024 05:35
@greglandrum greglandrum modified the milestones: 2024_03_2, 2024_03_3 May 2, 2024
//! \overload
inline std::string ChemicalReactionToRxnSmarts(const ChemicalReaction &rxn) {
SmilesWriteParams params;
params.canonical = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to take a while to go through, can you give me the nickel tour? Why do we need canonical=False for instance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it's SMARTS and we can't do sensible canonicalization with SMARTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMILES output option to disable the RDKit dative bond syntax
3 participants