The goal of GLST is to substitute computing long-range pair-wise interactions with atom-to-cell interactions. To that end, atoms must be assigned to the correct cells based on their positions. We accomplish this by sorting the atom data by the associated cell indices. First, a cell index is calculated for each atom based on its current position. This index determines which cell will include the atom's basis functions in the cell's structure factor. During this step, the number of atoms in each cell is also calculated. Properties of each atom including the three Cartesian coordinates and forces, charge, and energy are stored in respective 1-dimensional arrays partitioned by the corresponding cells.