-
Notifications
You must be signed in to change notification settings - Fork 663
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
updated CHEMFILES docs #3128
updated CHEMFILES docs #3128
Conversation
- add section on using chemfiles for reading and writing - fixed broken link to chemfiles formats
Hello @orbeckst! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-02-22 07:20:56 UTC |
@Luthaf , perhaps you could have a quick look, too — any comments welcome. |
Codecov Report
@@ Coverage Diff @@
## develop #3128 +/- ##
===========================================
- Coverage 93.12% 92.67% -0.46%
===========================================
Files 171 171
Lines 22706 22706
Branches 3209 3209
===========================================
- Hits 21146 21043 -103
- Misses 1503 1615 +112
+ Partials 57 48 -9
Continue to review full report at Codecov.
|
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 looks good to me!
- link to 0.9.3 chemfiles docs - document supported versions and helper functions and data
@Luthaf do you know why we restricted chemfiles to 0.9 ≤ v < 0.10 in MDAnalysis? |
There were big API changes between 0.8 and 0.9, and 0.10 was far from done when I wrote this code so I did not know if there were going to be more API changes, hence the rather conservative compatibility bounds =). Now I think compatibility can be updated to any 0.9.x or 0.10.x version. |
Thanks for the explanation.
Would you mind raising an issue for lifting the upper bound? I don’t want to do this in docs-only PR because there might have to be considerations regarding testing with chemfiles 0.9 or 0.10 or at least a quick on/off test. Thanks!
… On Feb 19, 2021, at 1:45 PM, Guillaume Fraux ***@***.***> wrote:
There were big API changes between 0.8 and 0.9, and 0.10 was far from done when I wrote this code so I did not know if there were going to be more API changes, hence the rather conservative compatibility bounds =). Now I think compatibility can be updated to any 0.9.x or 0.10.x version.
|
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.
LGTM, thank you @orbeckst!
Italicization to provide a sort-of inline heading of what the example is about. Did it give the wrong impression? Should we use a different example?
…
In package/MDAnalysis/coordinates/chemfiles.py:
> +--------------------------
+
+When reading, set the ``format="CHEMFILES"`` keyword argument and I/O is delegated to
+`chemfiles`_. For example::
+
+ >>> import MDAnalysis as mda
+ >>> from MDAnalysis.tests import datafiles as data
+ >>> u = mda.Universe(data.TPR, data.TRR, format="CHEMFILES")
+ >>> print(u.trajectory)
+ <ChemfilesReader ~/anaconda3/envs/mda3/lib/python3.8/site-packages/MDAnalysisTests/data/adk_oplsaa.trr with 10 frames of 47681 atoms>
+
+You can then use the :class:`~MDAnalysis.core.universe.Universe` as usual while chemfiles
+is handling the I/O transparently in the background.
+
+`chemfiles`_ can also *write* a number of formats for which there are no Writers in
+MDAnalysis. For example, to *write a mol2 file*::
Just a small thing, why is "write a mol2 file" italicised?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I suppose I read the italicisation as emphasising that this particular example is for writing a mol2 file only, except that no other examples have been hitherto given. It's a small style thing but I personally wouldn't emphasise that, I suppose. Opinions from everyone else are welcome! |
If anyone wants to merge it please just "squash and merge" everything into one commit and edit the commit message appropriately. |
Just re-running CI here (checking for a certain failure we're seeing somewhere else), if it returns green I'll squash-merge. |
## Work done in this PR - Fixes broken link to the chemfiles format - Adds chemfiles to list of supported file formats - Adds examples for reading and writing files using chemfiles
Changes made in this Pull Request:
PR Checklist