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

Merged
merged 10 commits into from May 25, 2024

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

@greglandrum
Copy link
Member Author

greglandrum commented May 24, 2024

@bp-kelley do you have time to finish this review so that we can get this one in next week's release?

Copy link
Contributor

@ptosco ptosco left a comment

Choose a reason for hiding this comment

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

LGTM, sorry for the belated review.

@greglandrum
Copy link
Member Author

@bp-kelley do you have time to finish this review so that we can get this one in next week's release?

@bp-kelley : @ptosco did a review, so don't worry about this one.

@greglandrum greglandrum merged commit 2bc3a2d into rdkit:master May 25, 2024
12 checks passed
@greglandrum greglandrum deleted the feat/github7372 branch May 25, 2024 04:49
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
4 participants