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

Fixes #7306 #7510

Merged
merged 7 commits into from
Jul 1, 2024
Merged

Fixes #7306 #7510

merged 7 commits into from
Jul 1, 2024

Conversation

greglandrum
Copy link
Member

Do not cross bonds which were previously aromatic

Do not cross bonds which were previously aromatic
@greglandrum
Copy link
Member Author

@rvianello here's a proposed fix for this issue

@rvianello
Copy link
Contributor

@greglandrum thank you for this fix, it worked as desired on a couple of structures I tested. Thank you also for the explanation posted to #7306.

@@ -113,7 +113,8 @@ void write_template(std::ostringstream &res, RDKit::ROMol &tpl) {
}
RDKit::FileParserUtils::moveAdditionalPropertiesToSGroups(trwmol);

res << RDKit::FileParserUtils::getV3000CTAB(trwmol, -1);
boost::dynamic_bitset<> wasAromatic(trwmol.getNumBonds());
res << RDKit::FileParserUtils::getV3000CTAB(trwmol, wasAromatic, -1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Due to the new getV3000CTab internally using the wasAromatic bitset, does this need to be changed or can it be the original:

res << RDKit::FileParserUtils::getV3000CTAB(trwmol, -1);

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right; there's no reason to change this.

@greglandrum
Copy link
Member Author

@bp-kelley I made the change you suggested

@greglandrum greglandrum merged commit 08c9640 into rdkit:master Jul 1, 2024
12 checks passed
@greglandrum greglandrum deleted the fix/github7306 branch July 1, 2024 03:00
greglandrum added a commit that referenced this pull request Jul 1, 2024
* Fixes #7306

Do not cross bonds which were previously aromatic

* revert one of the test changes

* change in response to review

---------

Co-authored-by: Riccardo Vianello <riccardo.vianello@gmail.com>
e-kwsm pushed a commit to e-kwsm/rdkit that referenced this pull request Jul 8, 2024
* Fixes rdkit#7306

Do not cross bonds which were previously aromatic

* revert one of the test changes

* change in response to review

---------

Co-authored-by: Riccardo Vianello <riccardo.vianello@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants