Goodman-lab / DP5

Python workflow for DP5 and DP4 analysis of organic molecules
Other
173 stars 99 forks source link

OSError: Bad input file /home/l3ul/Downloads/dp4/AT1_.sdf #8

Closed L3ul closed 4 years ago

L3ul commented 4 years ago

Initial input files: ['AT1_.sdf'] NMR file: NMRfolder Workflow: gmona Generating diastereomers... Get inchi f AT1.sdf Traceback (most recent call last): File "PyDP4_GUI.py", line 2001, in runPyDP4 self.NMRData, self.Isomers, self.settings, self.DP4Data = PyDP4.main(ui.tablewidget.Tab1.settings) File "/home/l3ul/Downloads/dp4/PyDP4.py", line 189, in main settings.InputFiles = InchiGen.GenDiastereomers(settings.InputFiles[0], settings.SelectedStereocentres) File "/home/l3ul/Downloads/dp4/InchiGen.py", line 296, in GenDiastereomers inchi, aux = GetInchi(f) File "/home/l3ul/Downloads/dp4/InchiGen.py", line 167, in GetInchi m = Chem.MolFromMolFile(cwd + '/' + f ,removeHs = False) OSError: Bad input file /home/l3ul/Downloads/dp4/AT1.sdf

I'm on a Debian 10.3 VM (Windows 10 host) using Conda.

KristapsE commented 4 years ago

It seems to not like the AT1_.sdf - does it exist? Does it contain valid sdf data? You could also try and provide the full set of diastereomers manually - ie AT1_1, AT1_2 etc and see if that works. This would mean the diastereomer generation would be skipped.

L3ul commented 4 years ago

I'm using data from this repository : https://www.repository.cam.ac.uk/handle/1810/303161, AT1.zip/MM.

On Wed, 15 Apr 2020 at 16:08, KristapsE notifications@github.com wrote:

It seems to not like the AT1_.sdf - does it exist? Does it contain valid sdf data? You could also try and provide the full set of diastereomers manually - ie AT1_1, AT1_2 etc and see if that works. This would mean the diastereomer generation would be skipped.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KristapsE/DP4-AI/issues/8#issuecomment-614029505, or unsubscribe https://github.com/notifications/unsubscribe-auth/APGFLG5L27ADZONVKPXSG43RMWWV7ANCNFSM4MIREHLQ .

KristapsE commented 4 years ago

Have you tried opening the sdf file with a text editor to make sure it hasn't been corrupted by chance? Did you manage to run by giving the AT1_1.sdf, AT1_2.sdf files as inputs?

ccyx1997 commented 4 years ago

I have came up with the same question in my win's system. It just because that at GetInchi in InchiGen.py at 165, the function used the path of current work path to find the NMR file. So you must put the AT1_.sdf at the same path with PyDP4.py

KristapsE commented 4 years ago

Oh, yes, thank you ccyx1997, that seems to be a peculiarity of the current GUI implementation. Something to add to the TO DO list then. The command line version shouldn't have this issue.

L3ul commented 4 years ago

ccyx1997's solution works. Cheers!

On Wed, 15 Apr 2020 at 16:47, KristapsE notifications@github.com wrote:

Oh, yes, thank you ccyx1997, that seems to be a peculiarity of the current GUI implementation. Something to add to the TO DO list then. The command line version shouldn't have this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KristapsE/DP4-AI/issues/8#issuecomment-614051169, or unsubscribe https://github.com/notifications/unsubscribe-auth/APGFLG2RBFH5WVXPCJ53VHLRMW3IRANCNFSM4MIREHLQ .

KristapsE commented 4 years ago

The latest update should have fixed the requirement to have the files in the source folder, allowing far more freedom in file locations.