dpdata icon indicating copy to clipboard operation
dpdata copied to clipboard

[BUG] Read `qe/cp/traj` with unit `angstrom` without `.cel` file

Open LavendaRaphael opened this issue 3 years ago • 0 comments

Summary

When dpdata read 'qe/cp/traj' with unit angstrom without '.cel' file, it will generate wrong result.

dpdata 0.2.6

Steps to Reproduce

Files list without cp.cel

cp.in
cp.pos

cp.in

...
CELL_PARAMETERS { angstrom }
       19.7299995422         0.0000000000         0.0000000000
        0.0000000000        19.7299995422         0.0000000000
        0.0000000000         0.0000000000        19.7299995422
...

command

dp_sys = dpdata.System(
    file_name = 'cp',
    fmt = 'qe/cp/traj',
    )
print(dp_sys['cells'][0])

output

[[10.44066613  0.          0.        ]
 [ 0.         10.44066613  0.        ]
 [ 0.          0.         10.44066613]]

When I add cp.cel file in filelist, then the output was right

cp.in
cp.pos
cp.cel
[[19.72999963  0.          0.        ]
 [ 0.         19.72999963  0.        ]
 [ 0.          0.         19.72999963]]

Further Information, Files, and Links

LavendaRaphael avatar May 26 '22 06:05 LavendaRaphael