-
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
Waterdynamics.SurvivalProbability start/stop/step/tau_max #2525
Waterdynamics.SurvivalProbability start/stop/step/tau_max #2525
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2525 +/- ##
===========================================
+ Coverage 91.14% 91.19% +0.04%
===========================================
Files 174 174
Lines 23717 23700 -17
Branches 3104 3099 -5
===========================================
- Hits 21618 21614 -4
+ Misses 1480 1472 -8
+ Partials 619 614 -5
Continue to review full report at Codecov.
|
tau_max : int, optional | ||
Survival probability is calculated for the range 1 <= `tau` <= `tau_max` | ||
Survival probability is calculated for the range | ||
1 <= `tau` <= `tau_max`. |
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 stop is exclusive does this docstring need updating?
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.
Not sure here. tau_max
should be independent of stop
, i.e. previously the case was that stop
was set in the code to be stop+1
. The changes done here only change it so that stop=stop
, tau
and tau_max
's behaviour shouldn't be affected (if that makes sense).
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.
Exactly, tau_max
is independent of stop
.
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.
Does the exclusive/inclusive change line this class up with the others?
@richardjgowers I think I have pretty much failed to understand what you meant from your review 😅 Any chance you could add some more info? |
You made stop exclusive (or inclusive) when it was the other way around. Is
it now like other classes?
…On Fri, Feb 28, 2020 at 09:06, Irfan Alibay ***@***.***> wrote:
Does the exclusive/inclusive change line this class up with the others?
@richardjgowers <https://github.com/richardjgowers> I think I have pretty
much failed to understand what you meant from your review 😅 Any chance
you could add some more info?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2525?email_source=notifications&email_token=ACGSGBZKBAWHD5BEWM2RKKLRFDHXXA5CNFSM4KSTDACKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENHZS2Y#issuecomment-592419179>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSGB534BEJDUDTUVD7K7LRFDHXXANCNFSM4KSTDACA>
.
|
@richardjgowers Yeah, so as per #2505 (review) the idea in making it exclusive was to align it with the AnalysisBase's exclusive mdanalysis/package/MDAnalysis/analysis/base.py Lines 179 to 180 in 977fb79
With regards to the other waterdynamics classes, unfortunately I'm not sure. I'm having a bit of a hard time working out how For
|
@alejob could you please also review this PR on WaterDynamics? There were a few questions #2525 (comment) and maybe you as one of the authors can answer them. Thanks! |
Ok, let me check this and I'll answer in a couple of days. I didn't realize all the current changes. |
Just re-pinging @alejob as a reminder for review. I do realise things are a little bit (that's probably an understatement) chaotic for everyone, so no worries if you don't have time to review this. |
Hey there!
It is also inclusive, in the code it is define as
but later I use this in this way
tf is a value fill by self.tf.
The -1 is because the list start in zero, so if there is not -1, there will be a "list index out of bound".
I hava a question about this PR, this is only for make it consistent with the AnalysisBase? I'm pretty sure I lost a discussion about this, but does this PR improve something in the usability of this class? and also, If I want to obtain the same results that this module delivers, with the new implementation I should add an unit to the tf value? ex: If before this PR I wanted to calculate something until the frame 1000, now should I write 1001? |
Thanks for having a look through @alejob It seems like I've completely failed to understand the behaviour of
So there are two aims to this PR.
Whilst the current behaviour is documented in
Indeed, assuming one had frames ranging from 0 to 1000, then if passed explicitly |
This looks mostly done (bringing WaterAnalysis in-line with the other analysis classes) although the following seems needed:
I added it to the 1.0 milestone so let's get this done. |
Sorry about the delay here @orbeckst, I've got a slot in my calendar specifically to look at this tomorrow :) A thought, do we want to extend this beyond survival probability to make stop exclusive across all of waterdynamics? |
That would be great – even if we don't have everything AnalysisBase-based yet, having a consistent interface is necessary. And with semantic versioning, backwards-incompatible changes in the API are very annoying because you need to bump the major version. Changing the meaning of the |
Oh, forgot: please do not apologize!!!!! You're doing an awful lot of work here, thank you, thank you! I see it as my job to occasionally check on PRs and help shepherd them to completion so that all the work that has already gone into them also counts. Sometimes one just has to clarify what needs doing. |
I would open a new PR, though, just to get this one done. It can then serve as a blueprint for the rest. As we're preaching to our GSoC students: many small PRs are better than one big one ;-). |
The conflicts should now be solved. Pinging @richardjgowers and @alejob for review. |
@alejob your review is important here. Do you have an idea when you might be able to do it? Thanks! |
Sorry for the late! Today at night I'll Look this.
El vie., 29 may. 2020 04:06, Oliver Beckstein <[email protected]>
escribió:
… @alejob <https://github.com/alejob> your review is important here. Do you
have an idea when you might be able to do it? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2525 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBMOONQ5IYBHXFEFLB7PTDRT5UI7ANCNFSM4KSTDACA>
.
|
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 understand that is necessary to have a module that is compatible with the AnalysisBase
, so I'm very happy with the general idea.
In the other side I don't see changes on the examples of documentation (or a comment), please change that, because it will be the only updated class and that could be confusing.
|
||
|
||
def run(self, tau_max=20, start=0, stop=None, step=1, residues=False, intermittency=0, verbose=False): | ||
def run(self, tau_max=20, start=None, stop=None, step=None, residues=False, |
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.
There is no longer backward compatibility warnings? why?
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.
@alejob by this do you mean the removal of t0
, tf
, and dtmax
? These have been slated for deprecation for a long time. As part of the upcoming 1.0.0 release, we are aiming to remove all historical deprecated code.
tau_max : int, optional | ||
Survival probability is calculated for the range 1 <= `tau` <= `tau_max` | ||
Survival probability is calculated for the range | ||
1 <= `tau` <= `tau_max`. |
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.
Exactly, tau_max
is independent of stop
.
Adds more documentation to detail that :class:`SurvivalProbability` now has an exclusive behaviour unike the other :mod:`MDAnalysis.analysis.waterdynamics` classes.
Thanks for the review @alejob. I have included documentation (beyond what was already in :meth: |
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.
Great, thank you!
Ping @richardjgowers for final approval? |
Fixes #2524
Changes made in this Pull Request:
t0
,tf
, anddtmax
keywords from the :class:Waterdynamics.SurvivalProbability
constructor.stop
keyword for :meth:WaterDynamics.SurvivalProbability.run
exclusive rather than inclusive.PR Checklist