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 behavior when both charge and valence are set, leading to inconsistent atom validation #5852

Open
Zhirnoff opened this issue Oct 24, 2024 · 0 comments
Labels
bug Micromolecules canvas Bucket: Micromolecules canvas related issues Priority: Medium

Comments

@Zhirnoff
Copy link
Collaborator

Steps to Reproduce

  1. Open Ketcher and draw any chemical structure.
  2. Select an atom and assign both a charge and a valence to it.
  3. Observe validation and behavior of the atom's properties on canvas.

Actual behavior

  • Both charge and valence are being considered simultaneously, leading to validation errors that are not in line with the expected behavior.
  • The atom is underlined incorrectly, indicating an error when the valence is greater than 1, even though the valence should take precedence and resolve the issue.
  • This behavior differs from other toolkits that only consider valence if it is explicitly set.

Expected behavior

  • When valence is specified, all other parameters (e.g., charge, radicals) should be ignored.
  • If only charge is set, the charge should be used in validation.
  • If both valence and other parameters (like charge) are set, only valence should be considered, and the validation should reflect that.

Screenshots
2024-10-24_14h36_26
image (2)

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 128.0.6613.120 (Official Build) (64-bit)

Ketcher version
[Version 2.26.0-rc.5]
Indigo version
[Version 1.25.0-rc.3]

@Zhirnoff Zhirnoff added bug Priority: Medium Micromolecules canvas Bucket: Micromolecules canvas related issues labels Oct 24, 2024
@Zhirnoff Zhirnoff added this to the Refined Backlog milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Micromolecules canvas Bucket: Micromolecules canvas related issues Priority: Medium
Projects
None yet
Development

No branches or pull requests

2 participants