-
Notifications
You must be signed in to change notification settings - Fork 670
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
Add in analysis function to calculate MSDs #2619
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2619 +/- ##
===========================================
- Coverage 91.17% 91.17% -0.01%
===========================================
Files 176 177 +1
Lines 23798 23787 -11
Branches 3134 3137 +3
===========================================
- Hits 21699 21687 -12
- Misses 1476 1478 +2
+ Partials 623 622 -1
Continue to review full report at Codecov.
|
@hmacdope this is cool, MSD is a frequent request. Have you looked at this package yet? https://github.com/pdebuyl-lab/tidynamics Iirc the package is well implemented, so it might be a good idea to make your MSD tool just a wrapped that squeezes MDA objects into tidynamics. |
Hey Richard, i'll have a look for sure! I would be happy to wrap around the library, however a quick look indicates to me that it seems to deal with single particle data (2D ndarrays), ie we would need repeated calls to their MSD function for each particle, operating on some kind of slice of our 3D ndarray trajectory (time,particle,xyz). Im unsure about the overhead for this, but it can be avoided with a bit of refactoring, which is what I have tried to do. |
also think could benefit from some cythonization |
@lilyminium is there a bilayer trajectory in the test set? This could be useful for demo purposes. I have a few lying around, but understand the desire to keep everything lightweight. |
@hmacdope GRO_MEMPROT, XTC_MEMPROT. A full list of datafiles and a description of them is in |
Thanks so much that makes my life so much easier. |
@hmacdope this is the sort of thing that might need a bigger file than we comfortably can fit in the testsuite. In which case maybe a mini regression test (ie checking you get a precalculated number again https://github.com/MDAnalysis/mdanalysis/pull/2622/files#diff-9b2087bc18e88659747785690262c888R46-R51) against the file linked above is fine. But then in addition there'll need to be some sort of larger test against |
@richardjgowers thanks. I'll come up with some good regression tests. |
Some ideas for low cost regression tests include toy problems, ie the unit step trajectory which fits y = Dx^2 exactly. |
Sorry for the comment spam, it appears that FFT based algorithms (tidynamics included) are only accurate for large toy MSDs (10000+ frames) out to about the fourth dp. This was causing me some confusion. Ill keep you posted on regression tests. |
Co-authored-by: Lily Wang <[email protected]>
This reverts commit af5cedf.
Co-authored-by: Lily Wang <[email protected]>
Co-authored-by: Lily Wang <[email protected]>
Co-authored-by: Lily Wang <[email protected]>
@hmacdope please look at your two failures: one is messed up docs in EinsteinMSD, the other is a missing Py 2 construct: for the latter, merge develop, which removes the check for Py 2 things. (EDIT: and don’t keep Py 2 constructs in the PR... Py 2 is gone). Once the tests pass, everything should be good to go (finally!). |
I think we should be okay now? Any qualms @lilyminium, @richardjgowers? |
@lilyminium @richardjgowers please make sure that you that when you're happy you squash and merge as opposed to merging these 136 commits... thanks. (Also thanks from ASV, which prefers to run on fewer commits and also likes having merge commits as opposed to rebases.) |
@lilyminium difficult to collect commits that would stand on their own I think. Just squash 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.
LGTM! Thank you @hmacdope!
Thanks to everyone involved, was a really fun experience. :) |
Congratulations on getting this PR finally merged. 253 comments (so far) is a high number, even by our standards. Thanks for your patience and seeing it through until the end. |
- Add in experimental code for calculation of MSD - both simple "windowed" calculation (N^2) - more sophisticated FFT based calculation (Nlog(N))
Fixes #2438
This is a WIP implementation for the calculation of Mean Squared Displacements
Changes made in this Pull Request:
This needs a fair bit more work, including more tests and docs
PR Checklist