Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Densities and grids are not converting correct units #854

Open
zerothi opened this issue Oct 25, 2024 · 1 comment
Open

Densities and grids are not converting correct units #854

zerothi opened this issue Oct 25, 2024 · 1 comment

Comments

@zerothi
Copy link
Owner

zerothi commented Oct 25, 2024

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.

@zerothi
Copy link
Owner Author

zerothi commented Oct 25, 2024

This issue got raised on the discord channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant