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

Incorrect phosphorus valence #2746

Open
jblack-mestre opened this issue Jan 30, 2025 · 0 comments
Open

Incorrect phosphorus valence #2746

jblack-mestre opened this issue Jan 30, 2025 · 0 comments

Comments

@jblack-mestre
Copy link
Contributor

jblack-mestre commented Jan 30, 2025

Summary
When generating an .svg image with indigo-depict phosphorus_valence.cml, the phosphorus is incorrectly depicted as having a wrong valence of 5. It should have a valence of 3, with no added hydrogens.

Steps to Reproduce

  1. indigo-depict.exe phosphorus_valence.cml phosphorus_valence.svg

Actual behavior
The phosphorus is depicted as having a valence of 5 with two added hydrogens.
Image

Expected behavior
The phosphorus should be depicted as having a valence of 3 with no added hydrogens.
Image

Environment details:

Attachments
phosphorus_valence.cml.txt

Additional context
When adding sgroup bonds, indigo recalculates the valence and implicit hydrogens before it has removed the bond to the atom connecting to the sgroup. So P initially has a valence of 3, then this is raised to 4 when adding the bond to the new sgroup. Once the valence is recalculated, this is increased to 5.

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

No branches or pull requests

1 participant