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

Make surface molecules from smiles using Argon workaround #2607

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sevyharris
Copy link
Contributor

Motivation or Problem

The issue is described here, #2603, but basically RDKit complains when you try to make a surface molecule using smiles.

Description of Changes

This PR adds a workaround where you initialize the molecule using Ar as a replacement for X to get the adjacency list and then remove the extra pairs of electrons and change Ar back to X to get the originally intended molecule.

@sevyharris sevyharris self-assigned this Feb 7, 2024
@sevyharris sevyharris linked an issue Feb 7, 2024 that may be closed by this pull request
Copy link
Member

@rwest rwest left a comment

Choose a reason for hiding this comment

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

This looks good. Could we have a couple unit tests? I think there are some templates to copy. Can we do a round-trip (i.e. generate SMILES-like strings with X in, that reproduce the original molecule on import)?

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.

Can't construct surface rmgpy.molecule.Molecule()
2 participants