Skip to content

Conversation

JonasSchaub
Copy link
Contributor

I noticed that charges were disappearing when extracting functional groups. A bit of digging made me realise that were are not correctly testing for it, the Vento-Foggia isomorphism check is not enough. This PR adds the copying of atomic charges and also a test subroutine for asserting that charges are not lost anymore.

@johnmay and @egonw what is the interplay of charge and formal charge? Setting the formal charge seems to also set the charge but not vice-versa. Is this observation/behaviour correct and should I therefore copy both as I am currently doing?

@johnmay
Copy link
Member

johnmay commented Feb 10, 2025

Charge is partial charge, typically you just want to set for FormalCharge

@johnmay
Copy link
Member

johnmay commented Feb 10, 2025

You probably do not want an equality check on the getCharge as it is a floating point/Double

@JonasSchaub
Copy link
Contributor Author

Thanks, @johnmay , with the latest commit, I'm only copying and testing the formal charges now.

@johnmay johnmay merged commit 4dcfe5d into cdk:main Feb 10, 2025
6 of 7 checks passed
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.

2 participants