protocaller/ProtoCaller

Invalid file format for file

Closed this issue · 2 comments

kexul commented

Hi, here is the code I used:

pro = Protein('6TOL', ligand_ref='201')

which raised an error:

parmed.exceptions.FormatNotFound: Could not identify file format

Hi, it seems that this is due to a bad SDF file supplied by the Protein Data Bank. Instead of this section:

  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  3  4  1  0  0  0  0

as with the other EDO ligands, EDO 207 has this section:

  2  4  1  0  0  0  0
  2  6  1  0  0  0  0
  6  8  1  0  0  0  0

The best thing we could do is to just give a warning if one of the downloaded ligands is invalid and press on. You can always amend it manually and re-add it to protein.ligands afterwards. I have pushed a commit now which should take care of that.

kexul commented

Thanks, it works perfectly!