-
Notifications
You must be signed in to change notification settings - Fork 668
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
Collective analysis of different analysis classes on the same trajectory #3569
Comments
We had a discussion about this some time ago, I thought I had a PR open about doing an analysis collection somewhere but I might have closed it or just never gotten around to it. I can re-open it if we want to come back to this. |
@MDAnalysis/coredevs are there any opinions or ideas? I will work on this if we want to have this and decide on a strategy. |
I was going to open that PR but I'm swamped with 2.2.0 edit: so I guess at this point I'm going to have to give up on it.. I'd appreciate it if we did that (releasing 2.2.0 and all the associated work around it) as a priority. |
@PicoCentauri Sorry I missed this the first time round. This is a great idea, and I am anticipating that this pattern of only looping through the trajectory once will be much faster than two loops. Problems I can foresee:
I think somewhere we talked about having an |
No problem! Your second point is indeed something I haven't thought about. However, altering the timestep could be something one wants to do. E.g. if AnalysisClass 1 unwraps the systems, which could be a costly operation, AnalysisClass 2 does not have to do it again. I am in favor of not having an |
@IAlibay if you still have your code it would be nice starting point. |
Disclaimer: I thought there was an issue in the past with this idea but I was not able to find it. Sorry if the following idea is
a duplication
Is your feature request related to a problem?
If one wants to run several analyses on the same trajectory one has to loop through the trajectory several times. For example, one naive way of analyzing two RDFs is the following:
I know that there is the
InterRDF_s
class which exactly does this job. But, the problem of a collective analysis loop holds for any analysis class and I only chose the RDF since it a straightforward example. In addition, a collected Analysis could makeInterRDF_s
superfluous.Describe the solution you'd like
I would introduce an
AnalysisCollection(*analysis_object)
class. When creating an object one can register severalanalysis_object
s as arguments. The run method ofAnalysisCollection
loops through thetrajectory and calls the
single_frame
method of eachanalysis_object
in every frame. Results are stored in each method.The code from above will simplify to
I think this is approach is fairly easy to implement since the managing of the data remains in the name space of each
analysis_object
.Describe alternatives you've considered
Keep everything as it is.
The text was updated successfully, but these errors were encountered: