ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
20 stars 4 forks source link

[BUG] Voronoi job failure #362

Closed ChiCheng45 closed 5 months ago

ChiCheng45 commented 5 months ago

Description of the error Running the voronoi job fails to run with the following error.

Traceback (most recent call last):
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 327, in run
    IJob._runner[mode](self)
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 216, in _run_singlecore
    idx, result = self.run_step(index)
                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\Voronoi.py", line 197, in run_step
    mean = np.array(global_volumes.values()).mean()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\AppData\Local\anaconda3\envs\MDANSE5\Lib\site-packages\numpy\core\_methods.py", line 131, in _mean
    ret = ret / rcount
          ~~~~^~~~~~~~
TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\xcb63893\AppData\Local\anaconda3\envs\MDANSE5\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Subprocess\Subprocess.py", line 46, in run
    self._job_instance.run(self._job_parameters)
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 335, in run
    raise JobError(self, tb)
MDANSE.Framework.Jobs.IJob.JobError: Traceback (most recent call last):
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 327, in run
    IJob._runner[mode](self)
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\IJob.py", line 216, in _run_singlecore
    idx, result = self.run_step(index)
                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\Jobs\Voronoi.py", line 197, in run_step
    mean = np.array(global_volumes.values()).mean()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\AppData\Local\anaconda3\envs\MDANSE5\Lib\site-packages\numpy\core\_methods.py", line 131, in _mean
    ret = ret / rcount
          ~~~~^~~~~~~~
TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

Additional details Run with an MDT file generated from the converting the DFTB h2o trajectory from MDANSE-Examples.

MBartkowiakSTFC commented 5 months ago

In principle, the branch correct-analysis-bugs has a fix for this one, but I will check with the trajectory you specified, just to be sure.

MBartkowiakSTFC commented 5 months ago

This is the results with default parameters voronoi_mean_volume and this is with pbc_border_size=0.5 voronoi_mean_volume_pbc0p5 But in principle it works on the trajectory you specified, so maybe I will try to make a valid PR out of the current state of that branch.