Re: [lammps-users] confusion about scaled coordinates for triclinic cells

Hi Robert,

"Here’s where I ran into trouble. I would expect the scaled coordinates of the cell corners {xlo, ylo, zlo} and {xhi, yhi, zhi} to be respectively

hinv {xlo, ylo, zlo} = {-.5, -.5, -.5}

and

hinv {xhi, yhi, zhi} = {.5, .5, .5}."

This is not correct because xhi yhi and zhi are *not* the coordinate of the top corner of the box when it is tilted. They are the coordinate of the orthogonal box formed by the untilted box faces, which is different. The attached python code and scheme should make it clearer: the corner coordinates are 0.5a+0.5b+0.5c

Otherwise your math are correct.

Regards,

Germain.

dump.txt (300 Bytes)

test_box.py (1.8 KB)