pmda icon indicating copy to clipboard operation
pmda copied to clipboard

cdf function in rdf.InterRDF_s does not give cummulative distribution function

Open VOD555 opened this issue 4 years ago • 1 comments

Expected behaviour

cdf function returns cummulative distribution function between particles A and particles B.

Actual behaviour

cdf function returns cummulative number density of particles B in a shell at distance r around a a particle.

Code to reproduce the behaviour

import MDAnalysis as mda
from MDAnalysisTests.datafiles import GRO_MEMPROT, XTC_MEMPROT
from pmda.rdf import InterRDF_s

u = mda.Universe(GRO_MEMPROT, XTC_MEMPROT)

s1 = u.select_atoms('name ZND and resid 289')
s2 = u.select_atoms('(name OD1 or name OD2) and resid 51 and sphzone 5.0
                         (resid 289)')
s3 = u.select_atoms('name ZND and (resid 291 or resid 292)')
s4 = u.select_atoms('(name OD1 or name OD2) and sphzone 5.0 (resid 291)')
ags = [[s1, s2], [s3, s4]]

rdf = InterRDF_s(u, ags, density=True)
rdf.run()
rdf.cdf()

Currently version of MDAnalysis:

MDAnalysis 1.0.0 pmda 0.2.1

VOD555 avatar Jul 11 '20 05:07 VOD555