Cartesian rules for atom mapping. (A) The definition of grid points overlapping with an atom is shown. The grid is represented by black lines, a random atom projected on the surface of the grid is represented as a black circle, and the overlapping grid points are marked with gray crosses. Any grid point partially or fully overlapping with the atom will be ticked by a gray cross. Each gray cross represents a grid point in which the algorithm will add 0.001 (if the atom is aliphatic and not too deep below the glycerol) or 1 (if the atom is polar) (see Algorithm description). (B) An example of clusters of elementary defects found by the connected component algorithm is shown. Once PackMem has computed the three matrices M_deep, M_shallow, and M_all (see Algorithm), each matrix will present elementary defects (represented by gray crosses), and some of them will be contiguous. The purpose of the connected component algorithm is to merge these neighboring elementary defects into clusters. Each cluster is then considered as a packing defect whose area can be computed. In general, a grid point of 1 Å2 is used. Thus, cluster A is 2 Å2, cluster B is 7 Å2, and cluster C is 4 Å2 in this example. Note that the algorithm uses an eight-connectivity (two grid points located diagonally are considered neighbors).