Skip to content

Densities and grids are not converting correct units #854

@zerothi

Description

@zerothi

Describe the issue

Reading RHO files from siesta converts the units from 1/Bohr^3 to 1/Ang^3.

However, when subsequently writing to a cube file it doesn't know that it is a density, and hence it doesn't change anything.
So it just writes it in 1/Ang^3, which results in problems... :(

The current solution is to do:

sgrid siesta.RHO -S 0.14818471147216278 --out rho.cube

The scaling factor can be calculated using:

sisl.unit.units("Bohr", "Ang") ** 3

Ideally physical quantities could hold a unit specification.

The problem with the grids are that not all things are densities, e.g. potentials do not have a volume density, they are scalar values at grid-points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions