Esempio n. 1
0
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])
Esempio n. 2
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
Esempio n. 3
0
def test_nbins(u, sels):
    rdf = InterRDF_s(u, sels, nbins=412).run()

    assert len(rdf.bins) == 412
Esempio n. 4
0
def rdf_s(u, sels, scheduler):
    return InterRDF_s(u, sels).run()
Esempio n. 5
0
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)
Esempio n. 6
0
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])
Esempio n. 7
0
def test_nbins(u):
    ags = sels(u)
    rdf = InterRDF_s(u, ags, nbins=412).run()

    assert len(rdf.bins) == 412