rigdenlab / SIMBAD

Sequence Independent Molecular replacement Based on Available Database
http://simbad.rtfd.io
BSD 3-Clause "New" or "Revised" License
3 stars 7 forks source link

AmoreRotationScore variable referenced before assignment #9

Closed fsimkovic closed 7 years ago

fsimkovic commented 7 years ago

Command

$ simbad-contaminant -amore_exe /home/felix/develop/simbad/static/amoreCCB2.exe -nproc 10 toxd.mtz 

Partial output

INFO:Preparing files for AMORE rotation function
INFO:Skipping 2a40_E: solvent content is predicted to be less than 30
INFO:Skipping 2gzw_B: solvent content is predicted to be less than 30
INFO:Skipping 3uy9_C: solvent content is predicted to be less than 30
INFO:Skipping 2j6h_A: solvent content is predicted to be less than 30
INFO:Skipping 4hzf_A: solvent content is predicted to be less than 30
INFO:Skipping 1oej_A: solvent content is predicted to be less than 30
INFO:Skipping 1mpb_A: solvent content is predicted to be less than 30
INFO:Skipping 4mtn_A: solvent content is predicted to be less than 30
INFO:Skipping 2j6h_B: solvent content is predicted to be less than 30
INFO:Skipping 1ge7_B: solvent content is predicted to be less than 30
INFO:Running AMORE rotation function on 2ajq_X
INFO:Running AMORE rotation function on 1ekb_A
INFO:Skipping 1kig_H: solvent content is predicted to be less than 30
INFO:Skipping 4ecb_A: solvent content is predicted to be less than 30
INFO:Skipping 1jxa_A: solvent content is predicted to be less than 30
INFO:Skipping 1ekb_B: solvent content is predicted to be less than 30
INFO:Running AMORE rotation function on 2a40_F
INFO:Skipping 1q23_I: solvent content is predicted to be less than 30
INFO:Skipping 4wkg_D: solvent content is predicted to be less than 30
INFO:Skipping 3fwe_A: solvent content is predicted to be less than 30
Process Process-4:
Traceback (most recent call last):
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 289, in run
    min_solvent_content)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 374, in _amore_run
    self.rotfun(logs_dir, shres, intrad, pklim, npic, rotastep)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 502, in rotfun
    simbad_util.run_job(command_line, logfile, key)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/util/simbad_util.py", line 148, in run_job
    child_stdin.write(key)
IOError: [Errno 32] Broken pipe
Process Process-6:
Traceback (most recent call last):
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 289, in run
    min_solvent_content)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 371, in _amore_run
    self.tabfun(model, x, y, z)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 654, in tabfun
    simbad_util.run_job(command_line, logfile, key)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/util/simbad_util.py", line 148, in run_job
    child_stdin.write(key)
IOError: [Errno 32] Broken pipe

...

INFO:Running AMORE rotation function on 3n4m_E
INFO:Skipping 1ggd_C: solvent content is predicted to be less than 30
INFO:Skipping 2a40_A: solvent content is predicted to be less than 30
INFO:Skipping 1c4t_A: solvent content is predicted to be less than 30
INFO:Skipping 3ooj_C: solvent content is predicted to be less than 30
INFO:Skipping 1f6m_C: solvent content is predicted to be less than 30
INFO:Skipping 1grl_A: solvent content is predicted to be less than 30
INFO:Skipping 1f6m_E: solvent content is predicted to be less than 30
INFO:Skipping 1c4t_C: solvent content is predicted to be less than 30
INFO:Skipping 1q23_H: solvent content is predicted to be less than 30
INFO:Skipping 1u9j_A: solvent content is predicted to be less than 30
INFO:Skipping 1z7e_D: solvent content is predicted to be less than 30
INFO:Skipping 4h6t_A: solvent content is predicted to be less than 30
INFO:Skipping 5abw_A: solvent content is predicted to be less than 30
INFO:Skipping 3hif_C: solvent content is predicted to be less than 30
Traceback (most recent call last):
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/felix/develop/ccp4-7.0/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/command_line/simbad_contaminant.py", line 68, in <module>
    main()
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/command_line/simbad_contaminant.py", line 57, in main
    rotation_search.amore_run(models_dir, logs_dir, nproc, shres, pklim, npic, rotastep, min_solvent_content)
  File "/home/felix/develop/ccp4-7.0/lib/py2/site-packages/simbad-0.0.1-py2.7.egg/simbad/rotsearch/amore_search.py", line 346, in amore_run
    score = _AmoreRotationScore(pdb_code, ALPHA, BETA, GAMMA, CC_F, RF_F, CC_I, CC_P, Icp, CC_F_Z_score,
UnboundLocalError: local variable 'ALPHA' referenced before assignment
hlasimpk commented 7 years ago

Hi Felix,

I've not been able to reproduce this bug locally using the toxd.mtz in ample/testfiles. I've fixed a few bugs elsewhere in the code so could you run this again and also send me the mtz file that you're using?

hlasimpk commented 7 years ago

Ah scratch that! I've just realised what is causing this bug! The amore exe needs to be in the same dir as some additional files in order for it to run correctly. I'm hoping that before long Charles will update CCP4 to include his modded version of amore but in the mean time I'm just soft linking it there. Because you're linking directly to an amore exe without the additional files needed to run it, the amore step is failing which is causing your error.

fsimkovic commented 7 years ago

:+1: Thanks for looking into this. Maybe add a note to the README file to clarify this?! Might be the best thing for now.

hlasimpk commented 7 years ago

Will do :)