Generally, different Ewald summation methods give different time complexities. Direct calculation gives O ( N 2 ) , where N is the number of atoms in the system. The PME method gives O ( N log ⁡ ⁡ N ) .