-
Notifications
You must be signed in to change notification settings - Fork 652
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
Fix bug in PCA trajectory iteration -- avoid explicit usage of self.start #4423
Fix bug in PCA trajectory iteration -- avoid explicit usage of self.start #4423
Conversation
Hello @marinegor! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-01-18 16:56:20 UTC |
Linter Bot Results:Hi @marinegor! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
fix formatting changes
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4423 +/- ##
==========================================
Coverage 93.36% 93.36%
==========================================
Files 171 185 +14
Lines 21736 22850 +1114
Branches 4012 4012
==========================================
+ Hits 20293 21334 +1041
- Misses 954 1027 +73
Partials 489 489 ☔ View full report in Codecov by Sentry. |
Could you also raise an issue @marinegor just so we have a record of what went wrong? |
hi @hmacdope , I raised the issue -- should I do anything else? |
So anyway, I added |
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.
@marinegor could you add
When using mean selections, the first frame of the selected trajectory slice is used as a reference.
To the main docstring of PCA
class? other than that looks good.
package/MDAnalysis/analysis/pca.py
Outdated
described by #4425 and fixed by #4423). Previously, behaviour was to | ||
manually iterate through ``self._trajectory``, which starting #3415 that | ||
introduced ``frames`` is wrong, and should use ``self._sliced_trajectory``. | ||
It is now fixed. |
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.
It is now fixed. |
@hmacdope done both (applied suggestion in my commit) |
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.
I will approve but would love a review from @IAlibay before going ahead and merging. Well done @marinegor!
@hmacdope happy to have a quick look tomorrow, could you do a review request for me please? (sorry I'm on phone) |
I think you are already requested. |
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.
Couple of small change suggestions, otherwise lgtm!
@@ -142,7 +142,8 @@ class PCA(AnalysisBase): | |||
generates the principal components of the backbone of the atomgroup and | |||
then transforms those atomgroup coordinates by the direction of those | |||
variances. Please refer to the :ref:`PCA-tutorial` for more detailed | |||
instructions. | |||
instructions. When using mean selections, the first frame of the selected |
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 great thanks!
Co-authored-by: Irfan Alibay <[email protected]>
Co-authored-by: Irfan Alibay <[email protected]>
Co-authored-by: Irfan Alibay <[email protected]>
Actually, |
Sorry maybe I didn't explain my point well enough - That being said - I'm not particularly too fussed here, it's just nice to enforce a branch decision rather than rely on defaults. |
@IAlibay I see what you mean now -- added explicit |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Looked like a timeout. Re-running Azure Pipelines completed successfully. |
This fixes a bug which made impossible the
Fixes #4425
Changes made in this Pull Request:
self._sliced_trajectory[0]
instead ofself._trajectory[self.start]
, sinceself.start
isNone
if run is initiated witha.run(frames=[1,2])
.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4423.org.readthedocs.build/en/4423/