-
Notifications
You must be signed in to change notification settings - Fork 718
Update NCDF Reader to read .ncrst Restart Files #5031
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
Turning this PR into a draft for now, because there is a wide-affecting bug with the |
Now that #5052 has been fixed, would it be worthwhile to rebase the PR and see if can continue? |
Regarding the status of this PR:
|
+---------------+-----------+-------+------------------------------------------------------+ | ||
| AMBER | ncdf, nc | r/w | binary (NetCDF) trajectories are fully supported with| | ||
| | | | optional `netcdf4-python`_ module (coordinates and | | ||
| | | | velocities). Module :mod:`MDAnalysis.coordinates.TRJ`| | ||
+---------------+-----------+-------+------------------------------------------------------+ | ||
| AMBER | ncrst, | r | binary (NetCDF) restart file | | ||
| | ncrestrt, | | Module :mod:`MDAnalysis.coordinates.INPCRD | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | ncrestrt, | | Module :mod:`MDAnalysis.coordinates.INPCRD | | |
| | ncrestrt, | | Module :mod:`MDAnalysis.coordinates.INPCRD` | |
.. Links | ||
|
||
.. _AMBER: http://ambermd.org | ||
.. _AMBER INPCRD FORMAT: http://ambermd.org/formats.html#restart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this link is 404 when I accessed it, maybe this one?
@@ -22,29 +22,92 @@ | |||
# | |||
|
|||
|
|||
"""INPCRD structure files in MDAnalysis --- :mod:`MDAnalysis.coordinates.INPCRD` | |||
"""AMBER restart files in MDAnalysis --- :mod:`MDAnalysis.coordinates.INPCRD` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""AMBER restart files in MDAnalysis --- :mod:`MDAnalysis.coordinates.INPCRD` | |
"""AMBER coordinate/restart files in MDAnalysis --- :mod:`MDAnalysis.coordinates.INPCRD` |
|
||
See Also | ||
-------- | ||
:class:`NCDFReader` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some hyperlinks to classes within this module are not working. You need to use absolute references, for example,
:mod:`MDAnalysis.coordinates.INPCRD`
errmsg = (f"NCDF trajectory {self.filename} does not contain " | ||
f"frame information") | ||
raise ValueError(errmsg) from None | ||
# try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean up the commented-out code or add a comment explaining why it’s being retained.
@@ -102,7 +102,7 @@ class INPReader(base.SingleFrameReaderBase): | |||
* Box information is not read (or checked for). | |||
* Velocities are currently *not supported*. | |||
|
|||
.. versionchanged: 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed?
If you have a new change, add a versionchanged BELOW with a summary of user-relevant changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was from a commit from #3942 when @IAlibay was implementing this (which I git cherry-picked). That PR never got merged/completed. I assume it's because 0.20.0
was the newest version back when this was written. I'm simply reusing some of the docstrings he wrote back then for if/when this is finally merged into develop
.
https://github.com/MDAnalysis/mdanalysis/pull/3942/files#diff-866fcc034359780910de97ee91a381661555985d630bfe9d34600f254bc1bb2fR105
(Line 105 in INPCRD.py)
If you check the current develop
branch, that versionchanged
text isn't there.
https://github.com/MDAnalysis/mdanalysis/blob/develop/package/MDAnalysis/coordinates/INPCRD.py#L45
Ok, thanks for the explanation.
|
Fixes #5030
Changes made in this Pull Request:
.ncrst
restart filesncrst
file is readed correctly. The test file I used is created from a .nc file already present in MDAnalysisTestPR Checklist
package/CHANGELOG
file updated?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--5031.org.readthedocs.build/en/5031/