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

deltancSileTBtrans saves geometry in bohr units, but doesn't convert back on load #234

Closed
jonaslb opened this issue Jun 30, 2020 · 3 comments

Comments

@jonaslb
Copy link
Contributor

jonaslb commented Jun 30, 2020

Describe the bug
deltancSileTBtrans saves the geometry in bohr units, but doesn't do a conversion back to Ångstrøm on load.

Reproducable code

import sisl as si, numpy as np; from pathlib import Path
dH = si.Hamiltonian(si.geom.graphene())
dH[0,0] = 1
p = Path("test.delta.nc")
si.get_sile(p, "w").write_delta(dH)
g2 = si.get_sile(p).read_geometry()
p.unlink()
assert np.allclose(g2.xyz, dH.geometry.xyz, atol=1e-5), "position mismatch"

Version details
sisl master

@zerothi
Copy link
Owner

zerothi commented Jun 30, 2020

fixed, thanks for the bug-report!

@jonaslb
Copy link
Contributor Author

jonaslb commented Jun 30, 2020

Thanks, I didnt check but I think this applies to sc as well though

@zerothi
Copy link
Owner

zerothi commented Jun 30, 2020

Yes, it did, and I fixed that also :)

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

2 participants