nomad-coe / nomad

NOMAD lets you manage and share your materials science data in a way that makes it truly useful to you, your group, and the community.
https://nomad-lab.eu
Apache License 2.0
64 stars 14 forks source link

add _magnitude to ureg().to() when passing arrays to ase.Atoms #72

Closed mdforti closed 1 year ago

mdforti commented 1 year ago

as mentioned here;

https://github.com/nomad-coe/nomad/issues/71

this warnings are raised when normalizing vasp outputs in script:

''' /scratch/AnacondaEnvironments/anaconda3/envs/nomad/lib/python3.9/site-packages/ase/cell.py:97: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. cell = np.array(cell, float) '''

''' /scratch/AnacondaEnvironments/anaconda3/envs/nomad/lib/python3.9/site-packages/ase/atoms.py:424: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. a = np.array(a, dtype, order='C') '''

this fixes:

https://github.com/nomad-coe/nomad/commit/1e2200c9f5647b70641a4589f809f5d8c7685306

lauri-codes commented 1 year ago

This is now fixed in the develop branch by this commit.