Skip to content

Use Results class for PCA Analysis#3285

Merged
IAlibay merged 20 commits intoMDAnalysis:developfrom
PicoCentauri:3275-results-pca
May 27, 2021
Merged

Use Results class for PCA Analysis#3285
IAlibay merged 20 commits intoMDAnalysis:developfrom
PicoCentauri:3275-results-pca

Conversation

@PicoCentauri
Copy link
Contributor

@PicoCentauri PicoCentauri commented May 7, 2021

Fixes #3275

Changes made in this Pull Request:
Move the results of the PCA analysis to the new results class

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@pep8speaks
Copy link

pep8speaks commented May 7, 2021

Hello @PicoCentauri! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-05-27 19:54:14 UTC

@PicoCentauri PicoCentauri changed the title Use results for pca Use Results class for PCA Analysis May 7, 2021
@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #3285 (a2f5287) into develop (560feed) will increase coverage by 0.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3285      +/-   ##
===========================================
+ Coverage    92.88%   93.61%   +0.73%     
===========================================
  Files          171      176       +5     
  Lines        22323    22835     +512     
  Branches      3224     3224              
===========================================
+ Hits         20734    21378     +644     
- Misses        1043     1406     +363     
+ Partials       546       51     -495     
Impacted Files Coverage Δ
package/MDAnalysis/analysis/pca.py 100.00% <100.00%> (+0.66%) ⬆️
package/MDAnalysis/lib/NeighborSearch.py 96.42% <0.00%> (-3.58%) ⬇️
package/MDAnalysis/topology/tpr/obj.py 96.96% <0.00%> (-3.04%) ⬇️
...onality_reduction/DimensionalityReductionMethod.py 97.05% <0.00%> (-2.95%) ⬇️
package/MDAnalysis/analysis/density.py 82.45% <0.00%> (-0.08%) ⬇️
package/MDAnalysis/transformations/base.py 100.00% <0.00%> (ø)
package/MDAnalysis/tests/__init__.py 100.00% <0.00%> (ø)
package/MDAnalysis/analysis/legacy/x3dna.py 0.00% <0.00%> (ø)
package/MDAnalysis/tests/datafiles.py 100.00% <0.00%> (ø)
package/MDAnalysis/due.py 75.00% <0.00%> (ø)
... and 90 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 560feed...a2f5287. Read the comment docs.

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple comments, not too sure about the docstring change (it looks good to me, but I don't remember if that was the direction we wanted to go to or not).

PicoCentauri and others added 3 commits May 8, 2021 00:23
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping my request changes status as a blocking comment because I think the mean_atoms path needs further thought (at least on how we will handle it for 2.0).

It's not really a problem with this PR, but that code path really doesn't seem to work (at least me atm), and I'd prefer we fix #2728 before we do any further changes. We could merge as-is and then promise to fix #2728 before the full release too, so I'll just leave it up for discussion and go with the majority opinion.

@orbeckst
Copy link
Member

orbeckst commented May 8, 2021

Not sure where we are with the soft code freeze. However, if we want PCA for the workshop then this PR needs to go in, even if mean atoms still needs fixing.

However, we can always add fixes, we have a hard time putting in breaking changes so I would suggest to move forward with this PR.

I’m sorry, I have limited bandwidth today to do more.

@IAlibay
Copy link
Member

IAlibay commented May 8, 2021

Not sure where we are with the soft code freeze. However, if we want PCA for the workshop then this PR needs to go in, even if mean atoms still needs fixing.

However, we can always add fixes, we have a hard time putting in breaking changes so I would suggest to move forward with this PR.

I’m sorry, I have limited bandwidth today to do more.

Sorry, I can't do any more today. If @fiona-naughton or one of the @MDAnalysis/coredevs wants to push this through then that'd be great. See discord for more on what our priority merges should be.

@fiona-naughton
Copy link
Contributor

If it's agreed that mean_atoms should have the average positions as calculated/provided to self.means, then that could be fixed by making a dummy atom group and populating the positions with the values from means something like I'm currently doing in #3296 (thought there I didn't need to worry about atom typing etc).

But the updated docs here reflects that it's just the atom selection rather than implying anything about positions and it's not used anywhere else, so the only issue I can see is the name being misleading - so ultimately I'd say it's fine to just leave it as is. Eventually I think we can get rid of it, or just return the position array instead, but that can wait for another day.

tl;dr I say leave mean_atoms for now and decide what to do with it later; everything else lgtm

Co-authored-by: Fiona Naughton <fiona.naughton@asu.edu>
@orbeckst
Copy link
Member

Will look at this PR as soon as PR #3296 is merged.

@orbeckst
Copy link
Member

Note that PR #3296 removes mean_atoms.

@orbeckst
Copy link
Member

@fiona-naughton @IAlibay please re-review after removal of mean_atoms. Thanks.

@orbeckst
Copy link
Member

The docs for MDAnalysis.analysis.pca.PCA.cumulative_overlap and rmsip contain a badly rendered See Also section. Would you be able to fix these as well? I am appealing to your 🇩🇪 sense for tidiness ;-).

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect links in See Also ... maybe my suggestions fix it

@orbeckst
Copy link
Member

@fiona-naughton @IAlibay I assume you're knackered after non-stop workshopping but if you could have a look if this PR finds your approval then we could make another big check mark. (Fixing docs is ongoing)

@PicoCentauri
Copy link
Contributor Author

Thanks, for fixing the link @orbeckst!

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one change, otherwise lgtm (I'll approve so I'm not blocking).

@orbeckst
Copy link
Member

I am messing up with the docs — I'll now fix this for once and for all.

Copy link
Contributor

@fiona-naughton fiona-naughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@orbeckst
Copy link
Member

@IAlibay , ready for you; the docs for rmsip and cumulative_overlap finally show up, too!

@IAlibay
Copy link
Member

IAlibay commented May 27, 2021

Thanks for all the work here @PicoCentauri and @orbeckst !

@IAlibay IAlibay merged commit 13e1a0f into MDAnalysis:develop May 27, 2021
@PicoCentauri PicoCentauri deleted the 3275-results-pca branch June 5, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update PCA analysis to use new .results

5 participants