jaredsampson / pymolprobity

A MolProbity-style visualization plugin for PyMOL
MIT License
11 stars 3 forks source link

"Run Flipkin" raises error #6

Closed speleo3 closed 5 years ago

speleo3 commented 7 years ago

Platforms tested:

OS X 10.9 with MacPyMOLX11Hybrid and with Open-Source PyMOL

Steps to reproduce:

  1. fetch 1ubq
  2. "Run Reduce"
  3. "Run Flipkin"

Error:

Error: 1
<type 'exceptions.AttributeError'> Exception in Tk callback
  Function: <function flipkin_mpobj at 0x1146b88c0> (type: <type 'function'>)
  Args: ()
Traceback (innermost last):
  File "/opt/schrodinger/MacPyMOL1840.app/Contents/pymol/modules/Pmw/Pmw_1_2/lib/PmwBase.py", line 1747, in __call__
    return apply(self.func, args)
  File "/Users/thomas/.pymol/startup/pymolprobity/gui.py", line 70, in flipkin_mpobj
    self.flipkin_radio.invoke('flipkinNQ')  # always start with NQ
  File "/opt/schrodinger/MacPyMOL1840.app/Contents/pymol/modules/Pmw/Pmw_1_2/lib/PmwRadioSelect.py", line 213, in invoke
    return command(name)
  File "/Users/thomas/.pymol/startup/pymolprobity/gui.py", line 98, in select_flipkin
    populate_flips_grp(flipkin)
  File "/Users/thomas/.pymol/startup/pymolprobity/gui.py", line 200, in populate_flips_grp
    o.views[flipkin] = kin.viewids()
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'viewids'
jaredsampson commented 7 years ago

Hi Thomas - Which version of the plugin gives you this error? I'm using brew-installed Open-Source PyMOL 1.8.2.1 and PyMOLX11Hybrid 1.8.4.2 and have not been able to reproduce this for PyMOLProbity v0.1.0, v0.1.1, or v0.1.2 on macOS 10.12.2 Sierra.

PyMOL>fetch 1ubq
 please wait ...
 ExecutiveLoad-Detail: Detected mmCIF
 CmdLoad: "./1ubq.cif" loaded as "1ubq".
INFO:pmg_tk.startup.pymolprobity.main:Generated Reduce output with flips for '1ubq'.
INFO:pmg_tk.startup.pymolprobity.main:Processed Reduce output to extract list of flips.
INFO:pmg_tk.startup.pymolprobity.main:Generated Flipkin output for '1ubq'.
LoadCoords-Error: atom count mismatch
WARNING:pmg_tk.startup.pymolprobity.main:not a typical flipkin group name: all
WARNING:pmg_tk.startup.pymolprobity.main:not a typical flipkin group name: flip
WARNING:pmg_tk.startup.pymolprobity.main:not a typical flipkin group name: all
WARNING:pmg_tk.startup.pymolprobity.main:not a typical flipkin group name: flip
WARNING:pmg_tk.startup.pymolprobity.main:not a typical flipkin group name: all
INFO:pmg_tk.startup.pymolprobity.main:Stored Flipkin output for '1ubq'.

I don't have access to a 10.9 machine...although it seems unlikely to me that it's OS version-specific.

Is it possible that you're using a Flipkin version that requires phenix.reduce and phenix.probe without having Phenix installed? Those phenix.xxx paths are hard-coded in the latest version of the Flipkin script.

speleo3 commented 7 years ago

I should have followed your installation instructions. I don't have phenix installed. I'm using https://github.com/rlabduke/MolProbity and I had bin/linux (or bin/macosx) in my $PATH, so the flipkin script wasn't actually found. May I suggest more robust error handling for that case? Scrolling up the error log I finally noticed:

ERROR:pmg_tk.startup.pymolprobity.main:Unable to run the following command:
`flipkin /tmp/tmpEFdRcK.pdb`
Please make sure flipkin is installed and can be found on the shell PATH.

I confirm that it works after I put bin in $PATH and created the following symlinks in bin:

phenix.probe -> linux/probe
phenix.reduce -> linux/reduce
prekin -> linux/prekin_64
probe -> linux/probe
reduce -> linux/reduce