MDAnalysis / pmda

Parallel algorithms for MDAnalysis
https://www.mdanalysis.org/pmda/
Other
31 stars 22 forks source link

n_frame in pmda.rdf is not right when given start, stop, step #114

Closed VOD555 closed 4 years ago

VOD555 commented 4 years ago

Expected behaviour

When given start, stop, step, rdf.InterRDF should calculate the average based on n_frame=(stop-start)/step.

Actual behaviour

But it uses number of frames of the whole trajectory.

Code to reproduce the behaviour

import MDAnalysis as mda
u = mda.Universe(top, trj)

from pmda.rdf import InterRDF

ag1 = u.select_atoms("name OH")
ag2 = u.select_atoms("name O")
rdf = InterRDF(ag1, ag2)
rdf.run(start=100, stop=200)