-
Notifications
You must be signed in to change notification settings - Fork 661
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
Update to chemfiles 0.10 #3126
Update to chemfiles 0.10 #3126
Conversation
Hello @Luthaf! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-05-08 00:15:17 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #3126 +/- ##
===========================================
+ Coverage 93.03% 93.55% +0.52%
===========================================
Files 172 172
Lines 22724 22806 +82
Branches 3193 3193
===========================================
+ Hits 21141 21337 +196
+ Misses 1533 1419 -114
Partials 50 50
Continue to review full report at Codecov.
|
@@ -333,7 +347,12 @@ def _timestep_to_chemfiles(self, ts): | |||
if ts.has_velocities: | |||
frame.add_velocities() | |||
frame.velocities[:] = ts.velocities[:] | |||
frame.cell = chemfiles.UnitCell(*ts.dimensions) | |||
|
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.
If this is the only real change, could we have a try/except here and allow 0.9 and 0.10?
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 is the only change in the part of the API used in MDA yes.
I could add a version check here, but for the future I'd like to not keep old versions around too long, and drop 0.9 when 0.11 comes out 😃
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.
Either way this goes, can the minimum version be pinned in the gh actions CI workflow? That way we can be sure we're picking up the right thing.
d77f887
to
88e88ce
Compare
I've pinned chemfiles to |
6950d1d
to
4f2fe62
Compare
Probably the best thing here is to do >=0.9 and then if we want to test legacy versions we can create a cron job for it when we get around to implementing #3052 (at least in my opinion, ideally the only legacy version we really want to test at every push is |
d03e815
to
63007cb
Compare
The codecov failure is weird, but other than that this should be ready to go! |
Rebased! Let's see what CI says. |
The python 3.6 runner fails with |
How strange. We've been having some occasional issues with gh actions and py3.6 lately. I have restarted CI to see if somehow that fixes it. |
It seems like a consistent error. Strangely enough it's not happening on the 3.6 runner with numpy 1.16.0. |
1bc8d2d
to
e2ca585
Compare
I think I found the origin of the issue here: libchemfiles links to libnetcdf, which links to libcurl. For a yet unknown reason, the conda build pulls in libssh2 from the biobuilds channel, which is linked by libcurl. libssh2 links to libopenssl.so.1.0.0, which is not installed (instead conda-forge gives us libopenssl.so.1.1.1). Given that the last update to libssh2 in biobuilds is more than 3 years old, I think it is best to stick with the conda-forge version. It looks like the biobuilds channel is used only for clustalw, is this right? It looks like removing biobuilds from the main list of channels and instead using the channel as a one shot ( |
The failed build is due to an HTTP error while fetching conda package. Could you restart it? |
Everything looks ok now, thanks for the restart! I'm not sure what to do about the codecov patch coverage error: most of the "not covered" lines are related to codepath for chemfiles 0.9 |
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.
Thanks @Luthaf sorry about all the CI related queries 😅 couple more things
f90b7e6
to
2c94ba0
Compare
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.
@Luthaf I'll approve as-is, if you can add the suggested test that'd be great, if it proves more complicated than just that addition then let's just go with this and we can fix coverage some other time.
Otherwise conda picks outdated version of libssh2 from biobuilds, which links to non-existing libopenssl.so.1.0.0
|
||
lengths = ts.dimensions[:3] | ||
angles = ts.dimensions[3:] | ||
if angles[0] == 0.0 and angles[1] == 0.0 and angles[2] == 0.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.
@Luthaf I'm actually not sure what's being done here, do you have a quick explanation you can provide?
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 might be me being overly defensive. Does MDA guarantee angles to have valid values? If so this check can probably be removed.
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.
O I see I guess you're capturing the [0., 0., 0., 0., 0., 0.]
default case here mostly? (i.e. #2698)
I'm going to ping @richardjgowers here who was working on this for 2.0 if I remember correctly, and might have better insights.
Maybe the best thing to do here is just to check for [0., 0., 0., 0., 0., 0.]
or None
as the default box case, and then if that's not the case crash out?
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.
Yes, chemfiles is fine with lengths of 0 but requires angles to be 90 in this case. I try to be generous in what code accept, so checking only for angles gives the maximal flexibility, but I'm also fine with checking if ts.dimensions
is [0., 0., 0., 0., 0., 0.]
and rejecting more wrong/missing cells.
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.
So what's the decision here? Should I change this to check for either [0., 0., 0., 0., 0., 0.]
or None
?
I’m fixing this behaviour in general in another PR, so either is fine
because it’ll get changed later.
…On Fri, May 7, 2021 at 17:19, Guillaume Fraux ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In package/MDAnalysis/coordinates/chemfiles.py
<#3126 (comment)>
:
> @@ -375,7 +391,17 @@ def _timestep_to_chemfiles(self, ts):
if ts.has_velocities:
frame.add_velocities()
frame.velocities[:] = ts.velocities[:]
- frame.cell = chemfiles.UnitCell(*ts.dimensions)
+
+ lengths = ts.dimensions[:3]
+ angles = ts.dimensions[3:]
+ if angles[0] == 0.0 and angles[1] == 0.0 and angles[2] == 0.0:
So what's the decision here? Should I change this to check for either [0.,
0., 0., 0., 0., 0.] or None?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3126 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSGB7GYOKT3MNC4PD6FNTTMQHIFANCNFSM4X4FE4PQ>
.
|
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
Changes made in this Pull Request:
Chemfiles 0.10 contains multiple fixes to different format readers; and add support for crystalographic CIF files, and extended XYZ (cf https://wiki.fysik.dtu.dk/ase/ase/io/formatoptions.html#extxyz)
PR Checklist