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
21 stars 5 forks source link

[BUG] MDT files generated with CHARMM and NAMD trajectories from MDANSE-Examples fails to load properly #314

Closed ChiCheng45 closed 6 months ago

ChiCheng45 commented 7 months ago

Description of the error MDT files can be generated from the 2vb1 CHARMM and the dmpc_in_water NAMD trajectory files from MDANSE-Examples however when you load these MDT files an error occurs.

The following error log is seen with the CHARMM generated MDT files a similar error is seen with NAMD.

Traceback (most recent call last):
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\InputData\HDFTrajectoryInputData.py", line 27, in load
    traj = Trajectory(self._name)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\MolecularDynamics\Trajectory.py", line 71, in __init__
    conf = PeriodicRealConfiguration(self._chemical_system, coords, unit_cell)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\MolecularDynamics\Configuration.py", line 202, in __init__
    super(_PeriodicConfiguration, self).__init__(
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\MolecularDynamics\Configuration.py", line 40, in __init__
    self["coordinates"] = np.array(coords, dtype=float)
    ~~~~^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\MolecularDynamics\Configuration.py", line 96, in __setitem__
    raise ValueError(
ValueError: Invalid item dimensions for coordinates; a shape of (1968, 3) was expected but data with shape of (30714, 3) was provided.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\TrajectoryTab.py", line 47, in load_trajectory
    data = HDFTrajectoryInputData(fname[0])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\InputData\InputFileData.py", line 30, in __init__
    self.load()
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE\Src\MDANSE\Framework\InputData\HDFTrajectoryInputData.py", line 31, in load
    raise InputDataError(str(e))
MDANSE.Framework.InputData.IInputData.InputDataError: 'Invalid item dimensions for coordinates; a shape of (1968, 3) was expected but data with shape of (30714, 3) was provided.'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\TrajectoryTab.py", line 49, in load_trajectory
    self._core.error(repr(e))
TypeError: native Qt signal is not callable