[lammps-users] quick question about triclinic tilt factor

Dear list:
Could someone give me a quick mapping from the standard parameters of a triclinic cell (a, b, c, alpha, beta, gamma) to the shape matrix h used in lammps. In particular when it says xy xz yz, is xy = |a||b|cos(theta_xy) = |x||y|cos(gamma)?

Thanks,
Talmesha

Talmesha,

To be precise:

h = {
a,
bsqrt(1-cosacosa),
csqrt(1-cosccosc-(cosb-cosccosa)(cosb-cosccosa)/(1-cosacosa)), c*(cosb-cosacosc)/sqrt(1-cosacosa), ccosc, bcosa};
With

cosa = cos(alpha);
cosb = cos(beta);
cosc = cos(gamma);

And

h = {xx, yy, zz, yz, xz, xy};

I use the above in a tcl script to draw simulation cell boxes in VMD.

Pieter