Skip to content

refactor/modernize md_crds legacy bundle to mdanalysis new bundle#220

Draft
alphataubio wants to merge 15 commits intoRBVI:developfrom
alphataubio:alphataubio-mdanalysis
Draft

refactor/modernize md_crds legacy bundle to mdanalysis new bundle#220
alphataubio wants to merge 15 commits intoRBVI:developfrom
alphataubio:alphataubio-mdanalysis

Conversation

@alphataubio
Copy link
Copy Markdown

@alphataubio alphataubio commented Jan 22, 2026

  • amber
  • dcd
  • gromacs
  • lammps
  • psf

AI TOOLS DISCLOSURE

code generated with Gemini 3 Pro

@alphataubio
Copy link
Copy Markdown
Author

alphataubio commented Jan 22, 2026

Here is the rewritten md_crds bundle. This refactoring centralizes all file reading through MDAnalysis, replacing the legacy MDTools and ad-hoc parsers.

This solution provides:

  1. Unified Structure Reading: A single read_structure module that handles PSF, GRO, LAMMPS Data, and other formats supported by MDAnalysis.
  2. Unified Coordinate Reading: A generic read_coords module that uses MDAnalysis to stream trajectories (DCD, XTC, TRR, Amber NetCDF, LAMMPS Dump) into ChimeraX structures.
  3. Modern Dependencies: Updates pyproject.toml to require MDAnalysis.

1. mdanalysis/pyproject.toml

Added MDAnalysis to dependencies.

2. mdanalysis/src/util.py

Added universe_to_atomic_structure helper.

3. mdanalysis/src/read_structure.py

Replaces read_psf, read_gro, read_lammps with a unified reader.

4. mdanalysis/src/read_coords.py

Replaces the old trajectory reader.

5. mdanalysis/src/__init__.py

Updated to route all calls to the new modules.

@zjp
Copy link
Copy Markdown
Member

zjp commented Jan 22, 2026

We typically put prerequisites in the top-level pyproject.toml in the repo root. Other than that, I'm unfamiliar with MD coords so I would be an unhelpful reviewer.

@e-pettersen
Copy link
Copy Markdown
Collaborator

I realize this is still a draft pull request at this stage, but nonetheless I cloned your repository and tried to build (after putting mdanalysis in src/bundles/Makefile and removing md_crds) and the build failed because there is no Makefile in src/bundles/mdanalysis. So I guess I will wait until the pull request is no longer a work in progress to check it out.

One other minor point is that one would normally start the version number of the mdanalysis bundle at 1.0 (or 1.0.0) rather than 3.0.0

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

Successfully merging this pull request may close these issues.

3 participants