Skip to content

Inconsistent dtype for universe.dimensions #2190

@PicoCentauri

Description

@PicoCentauri

Expected behavior

The dtype of the dimensions for a standard (not in-memory) universe should be consistent with an in-memory universe. This is in particular important for the low-lewel C functions like the make_whole function which will fail for the in-memory trajectory, since it requires a float.

Actual behavior

The dimension of the standard universe representation is a float and the in-memory representation is a double.

Code to reproduce the behavior

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD

u = mda.Universe(PSF, DCD)
u2 = mda.Universe(PSF, DCD, in_memory=True)

print(u.dimensions.dtype)
print(u2.dimensions.dtype)

Currently version of MDAnalysis

I'm using Python 3.6 and the dev version of MDAnalysis on MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions