ghostcut_triclininic

what is the geometric significance of this transformation?

length0 = sqrt(h_inv[0]*h_inv[0] + h_inv[5]*h_inv[5] + h_inv[4]*h_inv[4]);
cutghost[0] = cut * length0;
length1 = sqrt(h_inv[1]*h_inv[1] + h_inv[3]*h_inv[3]);
cutghost[1] = cut * length1;
length2 = h_inv[2];
cutghost[2] = cut * length2;
I understand those are the components of the map from x to lambda cords.

considering that LAMMPS has over 2000 files in the src folder and its subfolders alone, it would be extremely helpful to also mention the name of the source file this is in reference to and the line in that file (also possibly the LAMMPS version if you are not looking at the very latest developer version), so that giving you a competent and accurate answer doesn’t have to start with having to dig through the sources to find the location.

thanks,
axel.

comm_brick.cpp around 180-190

ok. so, from reading the comments one can infer the purpose of the code: it is used to determine the communication cutoff distance for ghost atoms in the case of a non-orthogonal cell.

in that case, all of the communication and exchange is done in fractional coordinates (aka lamda coords), where the simulation cell and all sub-cells are orthogonal (again). but you need to compute the correspondingly scaled cutoff for it. that is what the quoted code snipped does.

ok, so the intent is to advance rcut in the direction of the 3 triclinic vectors and the lengths have the effect of dividing by the box vector magnitudes to make them lambda coords?