Goodman-lab / DP5

Python workflow for DP5 and DP4 analysis of organic molecules
Other
175 stars 102 forks source link

Problem with running Macromodel #56

Closed flatstik closed 3 years ago

flatstik commented 3 years ago

Error generated while running PyDP4.py -w gnomes -s b3lyp --InChI Candidates_inchis.inchi experimental_nmr_files:

Files generated: InChI_Mol_0_0.mae
InChI_Mol_0_0.sdf
InChI_Mol_0_0.sdf.com

.....
Running MacroModel...
/appl/soft/chem/schrodinger/2021.3/bmin InChI_Mol_0_0
Traceback (most recent call last):
  File "/scratch/project_2003067/DP5/DP5/PyDP4.py", line 835, in <module>
    main(settings)
  File "/scratch/project_2003067/DP5/DP5/PyDP4.py", line 281, in main
    MacroModelOutputs = MacroModel.RunMacroModel(MacroModelInputs, settings)
  File "/scratch/project_2003067/DP5/DP5/MacroModel.py", line 154, in RunMacroModel
    outp = subprocess.check_output(MMPrefix + isomer, shell=True)
  File "/scratch/project_2003067/DP5/DP5_env/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/scratch/project_2003067/DP5/DP5_env/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '/appl/soft/chem/schrodinger/2021.3/bmin InChI_Mol_0_0' returned non-zero exit status 1.

Apparently the command should be bmin InChI_Mol_0_0 .sdf instead of bmin InChI_Mol_0_0

So for this to work, replace the following lines in MacroModel.py:

    Line 153 to: print(MMPrefix + isomer + '.sdf')
    Line 154 to: outp = subprocess.check_output(MMPrefix + isomer + '.sdf' , shell=True)

Then it complains about the mae-file it can't find, because it is looking for InChI_Mol_0_0.sdf.mae but there is only InChI_Mol_0_0.mae ..

When this is corrected by replacing line:

Line 54 to: outp = subprocess.check_output(convinp + f + ' -omae ' + f +

MacroModel.py.patch.tar.gz

This then hangs with the IsMMCompleted -loop. Any ideas? @HowarthA

HowarthA commented 3 years ago

Hi, I shall take a look at this when I get a chance, shouldn't be too much of a problem to fix.

flatstik commented 3 years ago

Hi, I shall take a look at this when I get a chance, shouldn't be too much of a problem to fix.

Great, thanks!

HowarthA commented 3 years ago

I've fixed this and the program runs on my end without a problem. This issue came from a unusual command where you specify diastereomer generation when the molecule doesn't have any diastereomers.