lammps-master/tools/msi2lmp/src/ReadCarFile.c
void lamda2x(double *lamda, double *x, double *h, double *boxlo)
{
  x[0] = h[0]*lamda[0] + h[5]*lamda[1] + h[4]*lamda[2] + boxlo[0];
  x[1] = h[1]*lamda[1] + h[3]*lamda[2] + boxlo[1];
  x[2] = h[2]*lamda[2] + boxlo[2];
}
/* ----------------------------------------------------------------------
   convert triclinic 0-1 lamda coords to box coords for one atom
   x = H lamda + x0;
   lamda and x can point to same 3-vector
------------------------------------------------------------------------- */
convert triclinic 0-1 lamda coords to box coords for one atom
x = H lamda + x0;
lamda and x can point to same 3-vector
convert triclinic 0 - 1 lamda coords to box coords for one atom x = H lamda + x0 ; lamda and x can point to same 3 - vector
void lamda2x(double *lamda, double *x, double *h, double *boxlo)
{
  x[0] = h[0]*lamda[0] + h[5]*lamda[1] + h[4]*lamda[2] + boxlo[0];
  x[1] = h[1]*lamda[1] + h[3]*lamda[2] + boxlo[1];
  x[2] = h[2]*lamda[2] + boxlo[2];
}
void lamda2x ( double * lamda , double * x , double * h , double * boxlo ) { x [ 0 ] = h [ 0 ] * lamda [ 0 ] + h [ 5 ] * lamda [ 1 ] + h [ 4 ] * lamda [ 2 ] + boxlo [ 0 ] ; x [ 1 ] = h [ 1 ] * lamda [ 1 ] + h [ 3 ] * lamda [ 2 ] + boxlo [ 1 ] ; x [ 2 ] = h [ 2 ] * lamda [ 2 ] + boxlo [ 2 ] ; }
convert triclinic 0-1 lamda coords to box coords for one atom
x = H lamda + x0;
lamda and x can point to same 3-vector
convert triclinic 0 - 1 lamda coords to box coords for one atom x = H lamda + x0 ; lamda and x can point to same 3 - vector