  We present a new reciprocal space analytical method to cutoff the long range
interactions in supercell calculations for systems that are infinite and
periodic in 1 or 2 dimensions, extending previous works for finite systems. The
proposed cutoffs are functions in Fourier space, that are used as a
multiplicative factor to screen the bare Coulomb interaction. The functions are
analytic everywhere but in a sub-domain of the Fourier space that depends on
the periodic dimensionality. We show that the divergences that lead to the
non-analytical behaviour can be exactly cancelled when both the ionic and the
Hartree potential are properly screened. This technique is exact, fast, and
very easy to implement in already existing supercell codes. To illustrate the
performance of the new scheme, we apply it to the case of the Coulomb
interaction in systems with reduced periodicity (as one-dimensional chains and
layers). For those test cases we address the impact of the cutoff in different
relevant quantities for ground and excited state properties, namely: the
convergence of the ground state properties, the static polarisability of the
system, the quasiparticle corrections in the GW scheme and in the binding
energy of the excitonic states in the Bethe-Salpeter equation. The results are
very promising.
