gmx_MMPBSA icon indicating copy to clipboard operation
gmx_MMPBSA copied to clipboard

TypeError: unhashable type: 'list'

Open bee-wulf opened this issue 1 year ago • 3 comments

Bug summary

I've exported my folder from the HPC server and run gmx_MMPBSA_ana on my linux virtual machine. Recently, with larger frame runs (I ahve 3000 frames for 30 ns), gmx_MMPBSA_ana crashes at the initial gui load screen after clicking accept when loading data.

Terminal output

gmx_MMPBSA_ana -f _GMXMMPBSA_info 
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/GMXMMPBSA/analyzer/dialogs.py", line 585, in run_process
    obj = obj_method(**v['args']) if v['args'] else obj_method()
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/GMXMMPBSA/API.py", line 816, in get_ana_data
    for t, id, result in imap_unordered_it:
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/multiprocessing/pool.py", line 870, in next
    raise value
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/GMXMMPBSA/API.py", line 189, in calculatestar
    return t, id, func(data, level, iec2, name, index, memory, id)
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/GMXMMPBSA/API.py", line 159, in _setup_data
    line_plot_data = tempdf[:-3].groupby(axis=1, level=0, sort=False).sum().reindex(
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/util/_decorators.py", line 324, in wrapper
    return func(*args, **kwargs)
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/frame.py", line 4804, in reindex
    return super().reindex(**kwargs)
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/generic.py", line 4966, in reindex
    return self._reindex_axes(
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/frame.py", line 4617, in _reindex_axes
    frame = frame._reindex_columns(
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/frame.py", line 4659, in _reindex_columns
    new_columns, indexer = self.columns.reindex(
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 4201, in reindex
    indexer = self.get_indexer(
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3784, in get_indexer
    return self._get_indexer(target, method, limit, tolerance)
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3809, in _get_indexer
    indexer = self._engine.get_indexer(tgt_values)
  File "pandas/_libs/index.pyx", line 305, in pandas._libs.index.IndexEngine.get_indexer
  File "pandas/_libs/hashtable_class_helper.pxi", line 5247, in pandas._libs.hashtable.PyObjectHashTable.lookup
TypeError: unhashable type: 'list'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/site-packages/GMXMMPBSA/analyzer/dialogs.py", line 598, in run
    for result in imap_unordered_it:
  File "/home/beewulf/miniconda3/envs/pbsa/lib/python3.9/multiprocessing/pool.py", line 870, in next
    raise value
TypeError: unhashable type: 'list'
Aborted (core dumped)

Actual outcome

the gui terminates and brings me back to the terminal.

Expected outcome

Data to load and be displayed nicely.

Additional information

This might be related to another issue i'm having with running the PBSA in gmx_MMPBSA, which I will post in that forum.

When I perform GBSA and select a lower frame count for the run (I've tried 940 frames total, < 10 ns of the simulation), gmx_MMPBSA_ana opens and displays data graphed nicely and normally.

Operating system

Ubuntu 18.04

gmx_MMPBSA_ana Version

1.5.6

Python version

3.9

Installation

pip

bee-wulf avatar Aug 02 '22 12:08 bee-wulf

The problem is not about the trajectory length, because the validation tests were done with 200000 frames. It could be that the calculation is failing in some frame. If possible, compress the results folder and send it to me so I can check it. You can send it to my email, as soon as we identify the problem it will be deleted.

Valdes-Tresanco-MS avatar Aug 02 '22 13:08 Valdes-Tresanco-MS

I have tried in several ways to reproduce this error, but I have not succeeded. I will keep trying, although I suspect it is these particular results. Following the same procedure with the trajectory fitted, it ends in error because the VDWAALS term is considerably large. Regardless, that the program should work no matter what options are selected (so far it does), doing a per-wise in your case does not make any sense. This approach is useful when you are trying to mutate a residue and want to estimate its energetic contribution to its environment, e.g., in silico affinity maturation for antibodies. In your case, in my opinion, it is a waste of resources and time not to obtain relevant information. If you want to enhance the interaction, per-residue should be more than enough, although as I mentioned above, your complex is not stable at all. Anyway, I'll leave the issue open in case the error persists, someone else gets it or I manage to reproduce it. HTH!

Valdes-Tresanco-MS avatar Aug 03 '22 15:08 Valdes-Tresanco-MS

Thank you, sir. It looks like I need to go back to the drawing board with this and figure out how to make it stable.

bee-wulf avatar Aug 04 '22 03:08 bee-wulf