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

Rascal exactConnectionsMatch bug #7359

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

Conversation

DavidACosgrove
Copy link
Collaborator

Reference Issue

No issue.

What does this implement/fix? Explain your changes.

Further testing of the new exactConnectionsMatch option for RASCAL revealed that the MCES sometimes gave incomplete results with different atom orders of the same molecule.

Any other comments?

I have also updated the docstring for the C++ MolToSmiles function as it was incomplete.

@@ -103,7 +103,7 @@ RDKIT_SMILESPARSE_EXPORT std::string MolToSmiles(
RDKIT_SMILESPARSE_EXPORT std::string MolToSmiles(
const ROMol &mol, const SmilesWriteParams &params);

//! \brief returns canonical SMILES for a molecule
//! \brief returns SMILES for a molecule, canonical by default
Copy link
Contributor

Choose a reason for hiding this comment

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

This might have snuck in accidentally, not that more docs are bad!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I came across it whilst fixing this bug, and it didn't seem worth a separate PR.

bondLabels[b->getIdx()] = atomLabels[b->getBeginAtomIdx()] +
std::to_string(b->getBondType()) +
atomLabels[b->getEndAtomIdx()];
if (b->getBeginAtom()->getAtomicNum() == b->getEndAtom()->getAtomicNum()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any other canonicalization that would be required? charge? hcount? Should you use getTotalDegree?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rather selfishly, perhaps, I went with just what I needed to get the job done. Element and bond type are already encoded, so I don't think getTotalDegree would be any different from getDegree. Charge might be useful, maybe, and you could make a case for options for things like treating all halogens the same. Given that enhancements now go in in the bug fixing releases, I think it would be ok to work on an on-demand basis.

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

2 participants