rdDetermineBonds.DetermineBonds(raw_mol,charge=charge) not able to assign bonds
Describe the bug
The rdDetermineBonds.DetermineBonds is not able to determine bonds when a real existing structure with correct charge is given.
To Reproduce
rdDetermineBonds.DetermineBonds(raw_mol,+2) Run follwing sequence: raw_mol = Chem.MolFromXYZFile(xyz_path) rdDetermineBonds.DetermineBonds(raw_mol,charge=+2)
With following .xyz data:
26 CSD_CIF_CAHLED1.xyz N 6.554551 2.047225 7.366736 C 4.184021 0.6872082 7.086856 C 4.89019 1.132814 5.977609 C 6.071334 1.814422 6.149645 C 5.922876 1.59922 8.459293 C 4.741342 0.915211 8.350165 C 2.89303 0.0007996164 6.97131 H 7.351865 2.560031 7.433496 H 4.62428 1.000012 5.186757 H 6.619768 2.184027 5.41785 H 6.28738 1.752021 9.256564 H 4.247028 0.6880081 9.166695 H 2.680496 -0.3440048 7.728782 C 2.1425 -0.0008003412 5.867198 C 0.8515096 -0.6872089 5.751652 C 0.1453412 -1.132815 6.860898 C -1.035803 -1.814423 6.688863 N -1.51902 -2.047226 5.471772 C -0.8873447 -1.59922 4.379215 C 0.2941893 -0.9152117 4.488342 H 0.7885031 -0.6880088 3.671813 H -1.25185 -1.752022 3.581944 H -2.316334 -2.560032 5.405012 H -1.584238 -2.184028 7.420658 H 0.4112505 -1.000013 7.651751 H 2.355034 0.344004 5.109726
Expected behavior Assign bond and gives +1 charges on the nitrogens. Instead the bond assignment failed for the +2 charge. Nonsense solution is given for -2 charge and 0 charge.
Configuration (please complete the following information): Totally latest RDkit installed by conda on Windows ...