You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think MemoryReader.filename came up before, because things like this might happen. Not sure what our Reader API states exactly, but maybe MemoryReader should have a default value of something like MEMORY
The quick fix, however, is to make the metadata creation more fault tolerant (or decide to scrap its autogeneration and leave it to usercode to provide the metadata dict). The reason why it's there in the first place was because it can be rather difficult to track provenance of densities; metadata was a simple way to maintain context.
p.s.: bonus points to @jbarnoud for the acronym for importing MDAnalysis.analysis.density ;-)
Expected behaviour
density_from_Universe
creates aDensity
object from an Universe that use the MemoryReader.Actual behaviour
density_from_Universe
calculate the density, but fails to create the resulting object as it is missing a filename to write as metadata.Code to reproduce the behaviour
Currently version of MDAnalysis:
(run
python -c "import MDAnalysis as mda; print(mda.__version__)"
)'0.16.0-dev0'
The text was updated successfully, but these errors were encountered: