Skip to content

Conversation

amruthesht
Copy link
Contributor

@amruthesht amruthesht commented Feb 19, 2025

Fixes #4827

This draft PR addresses the feature request discussed in #4827.

Note:
The IMDReader feature which was previously a part of the imdclient package has been moved into MDAnalysis below. Any other modules have been in retained in imdclient, which has been added as an optional dependency here. We are currently in the process of splitting the imdclient package as mentioned above. (Issue, PR)

Major changes made in this Pull Request:

  • IMDReader, other associated base classes and a utility function were added to coordinates in the main package.
  • Appropriate test cases for the reader were added as a part of test-imd.py
  • Other corresponding changes were made to CI and environment *.yaml files
  • imdclient was added as an optional dependency

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.


📚 Documentation preview 📚: https://mdanalysis--4923.org.readthedocs.build/en/4923/

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

❌ Patch coverage is 96.53179% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.88%. Comparing base (5d48c5c) to head (ea85bb5).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
package/MDAnalysis/coordinates/IMD.py 93.02% 0 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4923      +/-   ##
===========================================
+ Coverage    93.86%   93.88%   +0.02%     
===========================================
  Files          179      180       +1     
  Lines        22249    22422     +173     
  Branches      3161     3186      +25     
===========================================
+ Hits         20885    21052     +167     
  Misses         902      902              
- Partials       462      468       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amruthesht
Copy link
Contributor Author

Your thoughts on this are appreciated - @orbeckst

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Thanks for the initial PR.

  • The first big step is to get the tests running properly so that the CI uses an imdclient without IMDReader. Otherwise we are not sure we're testing the code here.
  • Minor initial comments while I skimmed.
  • Simple thing: run black over all files to get the formatting and ordering of imports right

@orbeckst orbeckst marked this pull request as draft February 19, 2025 23:48
@orbeckst
Copy link
Member

I set the PR to Work in progress for the time being, just to indicate that we're not yet at the stage where the CI is working. Once the tests run properly, we can update the status.

Obviously, this shouldn't discourage anyone from contributing and commenting.

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

A first quick look

Copy link
Contributor

@jaclark5 jaclark5 left a comment

Choose a reason for hiding this comment

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

I read through and nothing jumped out at me that wasn't already mentioned, except that I didn't see these changes in the documentation that was linked. The following needs to be added:

Add doc/sphinx/source/documentation_pages/coordinates/IMD.rst
.. automodule:: MDAnalysis.coordinates.IMD

doc/sphinx/source/documentation_pages/coordinate_modules.rst
coordinates/IMD

doc/sphinx/source/documentation_pages/references.rst
If you use IMD capability...

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, had a lookover, I will try and push some changes addressing some of these myself also, but would be good to pick up the momentum here again if possible.

@hmacdope
Copy link
Member

@amruthesht do we have a plan for pushing ahead with suggested changes?

@amruthesht
Copy link
Contributor Author

@amruthesht do we have a plan for pushing ahead with suggested changes?

Working on the imdclient repository right now. I had a few small issues there with using the IMDReader, but getting them fixed soon.
And then I'll wrap up some small changes on the mdanalysis end and we should be good to go!

amruthesht and others added 2 commits April 9, 2025 17:12
1. Moved `parse_host_port` to `IMD.py` and deleted `util.py`
2. Cleaned up `test_imd.py` - changes to `assert_*` functions and simplified non-applicable test to pass automatically
@hmacdope
Copy link
Member

hmacdope commented May 5, 2025

@amruthesht kicking CI here.

@hmacdope
Copy link
Member

hmacdope commented May 5, 2025

@yuxuanzhuang would you be able to have a run through?

@hmacdope hmacdope requested a review from yuxuanzhuang May 5, 2025 15:12
@yuxuanzhuang
Copy link
Contributor

I will have another look at the PR this week. One immediate thing is to add documentation.

Please refer to the comments below.

I read through and nothing jumped out at me that wasn't already mentioned, except that I didn't see these changes in the documentation that was linked. The following needs to be added:

Add doc/sphinx/source/documentation_pages/coordinates/IMD.rst .. automodule:: MDAnalysis.coordinates.IMD

doc/sphinx/source/documentation_pages/coordinate_modules.rst coordinates/IMD

doc/sphinx/source/documentation_pages/references.rst If you use IMD capability...

@hmacdope
Copy link
Member

hmacdope commented May 5, 2025

Need to figure out tests also @amruthesht

@jaclark5 jaclark5 self-requested a review May 24, 2025 23:52
@amruthesht amruthesht requested a review from IAlibay August 28, 2025 18:04
1. API doc on multiple connections
2. Jupyter usage of `close()` for secure closure of connections
Replace `IMDModuleStateManager` with standard pytest patterns
@hmacdope
Copy link
Member

hmacdope commented Sep 8, 2025

@amruthesht I think cd21d6bf4892bc8172f905816beffc1b6fff8369 has messed up the import guard somehow. I would consider reverting possibly.

@orbeckst
Copy link
Member

orbeckst commented Sep 8, 2025

@hmacdope @yuxuanzhuang what needs to be done to get the PR merged from your end?

(I had a cursory look at @IAlibay 's #4923 (review) and it seems to have been addressed but it's ultimately up to @IAlibay .)

- move details on which engines support multiple connections to imdclient docs (only update one place) and link
- rearranged warning/seealso boxes
orbeckst added a commit to Becksteinlab/imdclient that referenced this pull request Sep 8, 2025
- state for each engine if they support concurrent connections
- minor markup/link reformatting
- moved information  from MDAnalysis/mdanalysis#4923 to here
@hmacdope
Copy link
Member

hmacdope commented Sep 8, 2025

Quick weigh in from @IAlibay either way and I think we are good to go @orbeckst

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, pings didn't show up in my github feed.

Couple of cosmetic things and then this is good from me.

coordinates/GSD
coordinates/GRO
coordinates/H5MD
coordinates/IMD
Copy link
Member

Choose a reason for hiding this comment

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

Remember to open up a PR in the userguide to update the tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated current Issue #427 with a note about it. I'll work on a PR to make necessary updates to the UserGuide based on it.

@orbeckst
Copy link
Member

Once this is merged, we (= @amruthesht @HeydenLab @orbeckst ) would like to have a rc on pypi so that we can have at least one installable package for the workshop. We also need to update the codespace/docker images so the sooner we can have it, the better.

@IAlibay
Copy link
Member

IAlibay commented Sep 19, 2025

rc on pypi

@orbeckst RC of MDAnalysis?

@orbeckst
Copy link
Member

orbeckst commented Sep 19, 2025

Yes – a 2.10.0-rc1 pypi package so that we can have a "normal" pip install everywhere and when we get 2.10.0 out just before the UGM we have a simple update to the installation instructions (EDIT: and all the scripts inside the containers for the workshop that is supposed to run in codespace).

@IAlibay
Copy link
Member

IAlibay commented Sep 19, 2025

Yes – a 2.10.0-rc1 pypi package so that we can have a "normal" pip install everywhere and when we get 2.10.0 out just before the UGM we have a simple update to the installation instructions (EDIT: and all the scripts inside the containers for the workshop that is supposed to run in codespace).

How about just cutting a new release? At that point it would be the same amount of work I think. -- edit: I misread what you meant, sorry! I'm not super sure about doing a pypi rc, it's doable for a tarball but we won't be able to do wheels.

Maybe TBD in a call at some point?

1. Alphabetical order for `imclcient` as optional dependency
2. Changed order in `CHANGELOG`
@amruthesht amruthesht requested a review from IAlibay September 19, 2025 22:27
@amruthesht
Copy link
Contributor Author

@orbeckst - All remaining requested changes are done. Please let me know if there is anything else

@hmacdope
Copy link
Member

Congratulations @MDAnalysis/streaming!

@hmacdope hmacdope merged commit 519ac56 into MDAnalysis:develop Sep 23, 2025
23 checks passed
@orbeckst
Copy link
Member

@IAlibay ,

How about just cutting a new release? At that point it would be the same amount of work I think. -- edit: I misread what you meant, sorry! I'm not super sure about doing a pypi rc, it's doable for a tarball but we won't be able to do wheels.

Maybe TBD in a call at some point?

A proper 2.10.0 would also work, of course.

I assume a tarball would also work but perhaps we'll move the initial discussion to discord.

@orbeckst
Copy link
Member

And: hooray 🎉 !

Thank you everyone for all your hard work.

@IAlibay
Copy link
Member

IAlibay commented Sep 23, 2025

I assume a tarball would also work but perhaps we'll move the initial discussion to discord.

Yes, let's do that (move to discord), we're overdue a new release I think, python 3.14 is out in two-ish weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt a reader for live-streamed Interactive MD (IMD) version 3 trajectories

7 participants