-
Notifications
You must be signed in to change notification settings - Fork 658
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
Issue #3467: Replaced .coordinates() with .positions #3479
Conversation
Codecov Report
@@ Coverage Diff @@
## develop MDAnalysis/mdanalysis#3479 +/- ##
===========================================
+ Coverage 90.15% 93.75% +3.59%
===========================================
Files 176 176
Lines 23169 23169
Branches 3291 3297 +6
===========================================
+ Hits 20889 21723 +834
+ Misses 2280 1395 -885
- Partials 0 51 +51
Continue to review full report at Codecov.
|
@orbeckst Hey one of my tests seem to be failing could you help me out fixing it? |
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 for opening this PR @pranjii
The failing test is essentially an indication that there is a section of the code not covered by tests. Ideally we would want to add a test here to make sure that the code is working as expected.
Please also do add yourself to AUTHORS and update the CHANGELOG accordingly.
@@ -215,7 +215,7 @@ def covariance_matrix(ensemble, | |||
# Select the same atoms in reference structure | |||
reference_atom_selection = reference.select_atoms( | |||
ensemble.get_atom_selection_string()) | |||
reference_coordinates = reference_atom_selection.atoms.coordinates() | |||
reference_coordinates = reference_atom_selection.atoms.positions |
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.
The failed codecov check is indicating that the this line isn't covered by a test. This explains why tests didn't identify that atoms.coordinates()
no longer existed.
If possible could you add a test that checks this code path?
working on it |
@IAlibay Seems like I am not the guy who can do the tests. Should I revert my commits or will the PR be closed? |
Can you go into more details? If you want to walk us through what you think is going wrong I'm sure we can do our best to guide you towards tests that pass. So this is your current error |
I approved running the tests — if this is what you mean? We would want you to write actual tests for MDAnalysis that are run to check your fix. Have you written tests with pytests before? See https://userguide.mdanalysis.org/stable/testing.html to learn more about tests and to get started. |
@IAlibay Thank u. I will probably need some time to figure it all out and thank u for offering ur help. Right now I have a question: I didn't see any of the functions in Right now the problem is that I was unaware of how advanced was the mathematical concept I was dealing with, the Thank u for the support. |
Hello @pranjii , are you still working on this PR? |
Sorry I failed to respond to this. The tests should be under |
@orbeckst @IAlibay I noticed that lines 216-217 in
if reference is not None:
reference_coordinates = reference.atoms.positions.flatten()
else:
# Covariance calculation using distance to the mean
reference_coordinates = coordinates - np.mean(coordinates, axis=0) Additionally, tests for similarity uses covariance in |
Is ensemble really a Universe or something else (even though the docs say Universe object)?
… Am 1/13/22 um 01:10 schrieb Estefania Barreto-Ojeda ***@***.***>:
get_atom_selection_string() is not an attribute of Universe.
|
Yes, an ensemble is a Universe defined with from MDAnalysisTests.datafiles import DCD, PSF
import MDAnalysis as mda
traj = mda.Universe(PSF, DCD)
ens1 = mda.Universe(PSF, traj.trajectory.timeseries()) I don't know if the reference_atom_selection = ensemble.select_atoms(reference) instead of reference_atom_selection = reference.select_atoms(
ensemble.get_atom_selection_string()) If I am understanding correctly. (Spoiler alert: I may not) |
Fixing ENCORE is out of scope for this PR. I opened MDAnalysis/mdaencore#29 and #3539 to track that issue. Regarding the original issue, the code about rms is preceded by a comment that says:
We run daily benchmarks, the result of which are visible here: https://www.mdanalysis.org/benchmarks/. The benchmarks need to be ale to run on old commits as well, some of which being older than the The next step would be to:
|
By the way, MDAnalysis is currently in the process of evaluating a potential change in its license. As part of this we are asking that all new-ish contributors introduce themselves (with an email address that they regularly monitor) to the MDAnalysis developer list before we accept their contributions. Please include your github handle and a link to this pull request. The aim is that we then have a means of contacting the developers should we decide to change our license in the near future. Thank you. |
Hello @pranjii are you still working on this PR? There hasn't been any activity (including questions) for over a month so unless we hear anything over the next 4 days we will close this PR as stale. |
Fixes #3467
Changes made in this Pull Request:
-Replaced .coordinates() with .positions
PR Checklist