def test_same_result(u, sels, n_blocks): # should see same results from analysis.rdf.InterRDF_s # and pmda.rdf.InterRDF_s nrdf = rdf.InterRDF_s(u, sels).run() prdf = InterRDF_s(u, sels).run(n_blocks=n_blocks) assert_almost_equal(nrdf.count[0][0][0], prdf.count[0][0][0]) assert_almost_equal(nrdf.rdf[0][0][0], prdf.rdf[0][0][0])
def test_range(u): ags = sels(u) rmin, rmax = 1.0, 13.0 rdf = InterRDF_s(u, ags, range=(rmin, rmax)).run() assert rdf.edges[0] == rmin assert rdf.edges[-1] == rmax
def test_nbins(u, sels): rdf = InterRDF_s(u, sels, nbins=412).run() assert len(rdf.bins) == 412
def rdf_s(u, sels, scheduler): return InterRDF_s(u, sels).run()
def test_density(u, sels, density, value): rdf = InterRDF_s(u, sels, density=density).run() assert_almost_equal(max(rdf.rdf[0][0][0]), value)
def test_trj_len(u, sels, step): # should see same results from analysis.rdf and pmda.rdf nrdf = rdf.InterRDF_s(u, sels).run(step=step) prdf = InterRDF_s(u, sels).run(step=step) assert_almost_equal(nrdf.n_frames, prdf.n_frames) assert_almost_equal(nrdf.rdf[0][0][0], prdf.rdf[0][0][0])
def test_nbins(u): ags = sels(u) rdf = InterRDF_s(u, ags, nbins=412).run() assert len(rdf.bins) == 412