kienerj / pycdxml

Tools to automatically convert and proccess cdx and cdxml files in python
GNU General Public License v3.0
38 stars 5 forks source link

Molecules (salts) without bonds lead to error #19

Closed kienerj closed 2 years ago

kienerj commented 2 years ago

Converting a very simple molecule (usually salt) with no Bonds but more than 1 Atom from rdkit to cdxml leads to an index error likley caused by line around 299:

if len(bonds) == 0:
    return np.array([[0.0, 0.0, 0.0]])

This must not be hard coded but actually handle and position the single atoms as well.

baoilleach commented 2 years ago

From the comment on #24, is this not planned? Or is it something I could help with?

kienerj commented 2 years ago

Sorry about that. That was just some GitHub default when marking it as duplicate. I will look into it.

kienerj commented 2 years ago

fixed by cdd8d3a68f9b9cc9ede2647691bbe055e45d942d