Comments (6)
I doubt that packaging the histogram from PMDA into Density
instance in
Lines 314 to 317 in 1e99541
As an alternative density calculator you can use VMD's VolMap.
from pmda.
Are you sure that
Line 303 in 1e99541
run(start, stop, step)
parameters?
There's some "we're trying to be smart"-code in Density
https://github.com/MDAnalysis/mdanalysis/blob/d1b0e659329b1d98fc2422c88614a196976f3497/package/MDAnalysis/analysis/density.py#L331-L336 (which you can blame on me...) – can you check that Density
is not automatically setting parameters['isDensity']
to True
, which would mess up everything?
from pmda.
@nawtrey can you fix this one so that we can make a 0.3.0 release #106 ?
from pmda.
Can you please also look into why DensityAnalysis failed after merging into master? See https://travis-ci.org/MDAnalysis/pmda/jobs/592141990
=================================== FAILURES ===================================
_____________________________ test_n_frames[0-5-2] _____________________________
u = <Universe with 43480 atoms>, start = 0, stop = 5, step = 2
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 3
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d0ac42e48>._n_frames
E + and 3 = len(range(0, 5, 2))
E + where range(0, 5, 2) = range(0, 5, 2)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[0-4-1] _____________________________
u = <Universe with 43480 atoms>, start = 0, stop = 4, step = 1
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 4
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d4494a160>._n_frames
E + and 4 = len(range(0, 4))
E + where range(0, 4) = range(0, 4, 1)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[0-4-2] _____________________________
u = <Universe with 43480 atoms>, start = 0, stop = 4, step = 2
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 2
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d2f8eca90>._n_frames
E + and 2 = len(range(0, 4, 2))
E + where range(0, 4, 2) = range(0, 4, 2)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[1-5-1] _____________________________
u = <Universe with 43480 atoms>, start = 1, stop = 5, step = 1
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 4
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d1ba772b0>._n_frames
E + and 4 = len(range(1, 5))
E + where range(1, 5) = range(1, 5, 1)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[1-5-2] _____________________________
u = <Universe with 43480 atoms>, start = 1, stop = 5, step = 2
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 2
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d4f8e1940>._n_frames
E + and 2 = len(range(1, 5, 2))
E + where range(1, 5, 2) = range(1, 5, 2)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[1-4-1] _____________________________
u = <Universe with 43480 atoms>, start = 1, stop = 4, step = 1
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 3
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d090fd6a0>._n_frames
E + and 3 = len(range(1, 4))
E + where range(1, 4) = range(1, 4, 1)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
_____________________________ test_n_frames[1-4-2] _____________________________
u = <Universe with 43480 atoms>, start = 1, stop = 4, step = 2
@pytest.mark.parametrize("step", [1, 2])
@pytest.mark.parametrize("stop", [5, 4])
@pytest.mark.parametrize("start", [0, 1])
def test_n_frames(u, start, stop, step):
D = pmda.density.DensityAnalysis(u.atoms)
D.run(start, stop, step)
> assert D._n_frames == len(range(start, stop, step))
E assert 5 == 2
E + where 5 = <pmda.density.DensityAnalysis object at 0x7f1d1bb6f9e8>._n_frames
E + and 2 = len(range(1, 4, 2))
E + where range(1, 4, 2) = range(1, 4, 2)
/home/travis/build/MDAnalysis/pmda/pmda/test/test_density.py:85: AssertionError
from pmda.
It failed because the number of frames is grabbed from the length of the trajectory in __init__()
, not from the user-input start, stop and step. So I wrote a test that runs through different pieces of the trajectory and checked it against len(range(start, stop, step))
to verify that this was the problem with the normalization, which it is.
I'm currently working on a solution to this since the number of frames is never saved in the run method or dask helper. I looked at the RMSF function for inspiration since it has to divide by a similar value in _conclude()
for its final RMSF value calculation, and as it turns out this 'totalts' value is not 100% accurate either. So I need to find a solution for both functions.
from pmda.
Ok, my fault – I looked at the wrong travis run. Thanks for the explanation.
from pmda.
Related Issues (20)
- Parallelize select_atoms by coordinates HOT 7
- Turn ParallelAnalysisBase into dask custom collection HOT 3
- make_balanced_slices should raise error when n_blocks are larger than n_frames HOT 1
- Travis breaks due to new pytest 6.0.0 HOT 4
- np.hstack should not be used in _conclude
- Travis breaks due to matplotlib 3.3
- Bad Performance of Parallelization with On-the-fly Transformation HOT 10
- MAINT: Switch from Travis to Github actions as CI provider HOT 1
- Error when running `AnalysisFromFunction()` on more processes than frames HOT 3
- test compatibility with MDAnalysis 2.0.0
- Printing of hydrogen bonding analysis results using mdanalysis HOT 2
- sitemap.xml contains broken links
- drop Python 2.7 support HOT 5
- test if PMDA runs on Windows HOT 1
- pmda.density not compatible to MDA 2.0.0 HOT 1
- Any performance comparison between dask and multprocessing? HOT 2
- Uniform analysis results with MDA HOT 1
- AttributeError: Atom has no attribute indices. Do you mean index HOT 2
- Pip and conda distributions don't have H-Bond Analysis
- Incompatible with Numpy 1.24.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmda.