mtzgroup / ChemPixCH

Recognising hand-drawn molecules with neural networks
Apache License 2.0
29 stars 5 forks source link

Error occurs in smiles encoding containing @ #4

Open a-die opened 1 year ago

a-die commented 1 year ago

When I use the @ symbol in the smiles encoding for image synthesis, an error occurs.

File "D:\ProgramData\anaconda\envs\pytorch\lib\site-packages\rdkit\sping\pid.py", line 289, in stringBox return self.stringWidth(s, font), self.fontHeight(font) File "D:\ProgramData\anaconda\envs\pytorch\lib\site-packages\rdkit\sping\SVG\pidSVG.py", line 633, in stringWidth return pdfmetrics.stringwidth(s, fontname) font.size 0.001 File "D:\ProgramData\anaconda\envs\pytorch\lib\site-packages\rdkit\sping\PDF\pdfmetrics.py", line 320, in stringwidth w = w + widths[ord(char)] IndexError: list index out of range

I checked that it should be that the chiral molecule is not well written. What should I do?

tmartine68 commented 1 year ago

Use of the @ symbol to denote chirality is not supported at present. You can add it if you want...