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".
If the following check fails https://github.com/jensengroup/xyz2mol/blob/f51267357b250855007fd628446b3fbbed715ff2/xyz2mol.py#L507-L509 an empty list is returned by
AC2mol
and thereforexyz2mol.py
terminates without any output whatsoever.I suggest to add an
UserWarning
in case this check fails, which prints out bothChem.GetFormalCharge(mol)
andcharge
, 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".