schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

"ReadMOLFile-Error: bad atom count" on Pymol #277

Closed terrilvallikalam closed 1 year ago

terrilvallikalam commented 1 year ago

SDF Files.zip

PyMol_window

Hi,

I am running into this error on Pymol when opening a .sdf file. I have downloaded a large number of .sdf files from PubChem and wanted to check that they would open in Pymol. I opened the .sdf file in a text editor and copied the first conformer information in another text file and tried to open it in Pymol but it gave me "ReadMOLFile-Error: bad atom count". However, when I downloaded the .sdf file from Pubchem, the file opened on Pymol with no problem.

I compared both of the .sdf files on text edit and they looked exactly the same. Not sure why one file is opening and the other file is giving an error.

I've attached a zip of both the files. "237.sdf" is the one that is not opening and "Conformer3D_CID_237.sdf" is opening.

Any help would be appreciated!

JarrettSJohnson commented 1 year ago

This might be a issue with your text editor saving files. On top of 237.sdf I see this:

image

First line for reading these files should just be the number of atoms.

JarrettSJohnson commented 1 year ago

Closing this issue since I believe the image identifies the problem (non-standard SDF header).