Skip to content

MDAnalysis example - #1470

Open
Barfy007JB1 wants to merge 2 commits into
masterfrom
MDAnalysis-example
Open

Barfy007JB1 wants to merge 2 commits into
masterfrom
MDAnalysis-example

Conversation

@Barfy007JB1

Copy link
Copy Markdown
Collaborator

Description of work
A full example of how MDMC can be used to work with MDAnalysis

@Barfy007JB1 Barfy007JB1 self-assigned this Sep 6, 2024
@oerc0122
oerc0122 force-pushed the h5md-rw branch 2 times, most recently from 66557af to ff58fa1 Compare November 20, 2024 13:54
@oerc0122
oerc0122 changed the base branch from h5md-rw to h5md-write-best November 20, 2024 13:58
Base automatically changed from h5md-write-best to master April 30, 2025 11:02
@alexhroom
alexhroom force-pushed the MDAnalysis-example branch from 16f7b6e to 66896b1 Compare May 1, 2025 06:51
@alexhroom

alexhroom commented May 1, 2025 •

Copy link
Copy Markdown
Collaborator

reverted the changes from Ang to Angstrom present in this PR as they were causing issues and are out the scope of this PR!

@franzlang franzlang added this to the Release milestone Jun 3, 2025

@alexhroom alexhroom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't get this to run. firstly write_H5MD complains about the lack of creator name and email, but when that's fixed I get:

Traceback (most recent call last):
  File "/workspaces/MDMCv0.2_pilot/examples/mdanal.py", line 36, in <module>
    u = mda.Universe(topology_file_name, fn, format="h5md", topology_format='config',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/MDAnalysis/core/universe.py", line 436, in __init__
    self.load_new(coordinates, format=format, in_memory=in_memory,
  File "/usr/local/lib/python3.12/site-packages/MDAnalysis/core/universe.py", line 665, in load_new
    self.trajectory = reader(filename, format=format, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/MDAnalysis/lib/util.py", line 2701, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/MDAnalysis/coordinates/H5MD.py", line 450, in __init__
    if self._particle_group['box'].attrs['dimension'] != 3:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/usr/local/lib/python3.12/site-packages/h5py/_hl/attrs.py", line 56, in __getitem__
    attr = h5a.open(self._id, self._e(name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5a.pyx", line 80, in h5py.h5a.open
KeyError: "Unable to synchronously open attribute (can't locate attribute: 'dimension')"

@franzlang franzlang removed this from the Release milestone Oct 2, 2025
@franzlang franzlang added the P2 SOONISH: Tasks which may not be completed in the current development cycle. label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 SOONISH: Tasks which may not be completed in the current development cycle.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants