where ℜ and ℑ denote real and imaginary parts, respectively, and Q C = ∑ b∈C q b is the net charge of cell C . Depending on the compiler and optimization flag, arithmetic operations of complex numbers could be faster than calculations explicitly using trigonometric functions. Thus, it may be more efficient to take the real and imaginary parts in Eqs. 19 and 20 after evaluating the summation. As Fig. shows, the number of non-negative Gauss-Legendre roots is on the order of tens in typical cases, and {p e n } and {p f n } can be calculated before the beginning of a simulation. At each simulation step, the Q-factors are calculated for individual atoms, then the structure factor for each cell is calculated via Eq. 16. These calculations can be done independently for each atom. Since Eqs. 19 and 20 are essentially dot products, the GLST calculation can be performed in a highly parallel manner while needing minimal communication between threads.