Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Your tpx version is 134, which this parser does not support, yet #4855

Open
hariseldon99 opened this issue Dec 22, 2024 · 0 comments
Open

Comments

@hariseldon99
Copy link

Expected behavior

Successful import of GROMACS trajectory file using tpr file as topology

Actual behavior

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
File ~/gitrepos/mdanalysis/package/MDAnalysis/core/universe.py:113, in _topology_from_file_like(topology_file, topology_format, **kwargs)
    112     with parser(topology_file) as p:
--> 113         topology = p.parse(**kwargs)
    114 except (IOError, OSError) as err:
    115     # There are 2 kinds of errors that might be raised here:
    116     # one because the file isn't present
    117     # or the permissions are bad, second when the parser fails

File ~/gitrepos/mdanalysis/package/MDAnalysis/topology/TPRParser.py:212, in TPRParser.parse(self, tpr_resid_from_one, **kwargs)
    211 try:
--> 212     th = tpr_utils.read_tpxheader(data)                    # tpxheader
    213 except (EOFError, ValueError):

File ~/gitrepos/mdanalysis/package/MDAnalysis/topology/tpr/utils.py:233, in read_tpxheader(data)
    232 fileVersion = data.unpack_int()  # version of tpx file
--> 233 fileVersion_err(fileVersion)
    235 # This is for backward compatibility with development version 77-79 where
    236 # the tag was, mistakenly, placed before the generation.
    237 # These versions are development versions between the 4.5 and 4.6 series.

File ~/gitrepos/mdanalysis/package/MDAnalysis/topology/tpr/utils.py:208, in fileVersion_err(fver)
    207 if fver not in setting.SUPPORTED_VERSIONS:
--> 208     raise NotImplementedError(
    209         f"Your tpx version is {fver}, which this parser does not support, yet "
    210     )

NotImplementedError: Your tpx version is 134, which this parser does not support, yet 

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
Cell In[2], line 1
----> 1 u = mda.Universe("md500.tpr","md500.xtc")

File ~/gitrepos/mdanalysis/package/MDAnalysis/core/universe.py:417, in Universe.__init__(self, topology, all_coordinates, format, topology_format, transformations, guess_bonds, vdwradii, fudge_factor, lower_bound, in_memory, context, to_guess, force_guess, in_memory_step, *coordinates, **kwargs)
    415 if not isinstance(topology, Topology) and not topology is None:
    416     self.filename = _check_file_like(topology)
--> 417     topology = _topology_from_file_like(self.filename,
    418                                         topology_format=topology_format,
    419                                         **kwargs)
    421 if topology is not None:
    422     self._topology = topology

File ~/gitrepos/mdanalysis/package/MDAnalysis/core/universe.py:128, in _topology_from_file_like(topology_file, topology_format, **kwargs)
    124         raise IOError("Failed to load from the topology file {0}"
    125                         " with parser {1}.\n"
    126                         "Error: {2}".format(topology_file, parser, err))
    127 except (ValueError, NotImplementedError) as err:
--> 128     raise ValueError(
    129         "Failed to construct topology from file {0}"
    130         " with parser {1}.\n"
    131         "Error: {2}".format(topology_file, parser, err))
    132 return topology

ValueError: Failed to construct topology from file md500.tpr with parser <class 'MDAnalysis.topology.TPRParser.TPRParser'>.
Error: Your tpx version is 134, which this parser does not support, yet 

Code to reproduce the behavior

Install development version of MDAnalysis as follows:

git clone https://github.com/MDAnalysis/mdanalysis
cd mdanalysis
pip install -e package/

Compile and install latest GROMACS build from source:

wget https://ftp.gromacs.org/gromacs/gromacs-2024.4.tar.gz
tar zxvf gromacs-2024.4.tar.gz
cd gromacs-2024.4
mkdir build && cd build
cmake .. -DGMX_GPU=CUDA -DGMX_SIMD=AVX_512
export LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib:$LD_LIBRARY_PATH
make
sudo make install

Run a standard MD simulation and get top.tpr and traj.xtc files as output

Then try to create an mda universe in python

import MDAnalysis as mda
u = mda.Universe(top.tpr, traj.xtc)

Current version of MDAnalysis

  • Which version are you using? (run python -c "import MDAnalysis as mda; print(mda.__version__)")
    -- 2.9.0-dev0

  • Which version of Python (python -V)?

    • Python 3.12.8
  • Which operating system?
    -- Ubuntu 20.04.6 LTS, as well as Ubuntu 22.04.5 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant