xyz2mol icon indicating copy to clipboard operation
xyz2mol copied to clipboard

Add UserWarning for incorrect charge?

Open RMeli opened this issue 2 years ago • 0 comments

If the following check fails https://github.com/jensengroup/xyz2mol/blob/f51267357b250855007fd628446b3fbbed715ff2/xyz2mol.py#L507-L509 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 avatar Mar 01 '22 17:03 RMeli