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

Add UserWarning for incorrect charge? #32

Closed
RMeli opened this issue Mar 1, 2022 · 0 comments
Closed

Add UserWarning for incorrect charge? #32

RMeli opened this issue Mar 1, 2022 · 0 comments

Comments

@RMeli
Copy link

RMeli commented Mar 1, 2022

If the following check fails

xyz2mol/xyz2mol.py

Lines 507 to 509 in f512673

# If charge is not correct don't return mol
if Chem.GetFormalCharge(mol) != charge:
return []

an empty list is returned by AC2mol and therefore xyz2mol.py terminates without any output whatsoever.

I suggest to add an UserWarning in case this check fails, which prints out both Chem.GetFormalCharge(mol) and charge, to indicate what is happening to the user.

I can open a PR from the code on my fork, unless you prefer to keep the current "silent mode".

@RMeli RMeli closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
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