  Covalent organic frameworks (COFs) have attracted significant attention due
to their chemical versatility combined with a significant number of potential
applications. Of particular interest are two-dimensional COFs, where the
organic building units are linked by covalent bonds within a plane. Most
properties of these COFs are determined by the relative arrangement of
neighboring layers. These are typically found to be laterally displaced, which,
for example, reduces the electronic coupling between the layers. In the present
contribution, we use dispersion-corrected density-functional theory to
elucidate the origin of that displacement, showing that the common notion that
the displacement is a consequence of electrostatic repulsions of polar building
blocks can be misleading. For the representative case of COF-1, we find that
electrostatic and van der Waals interactions would, actually, favor a cofacial
arrangement of the layers and that Pauli repulsion is the crucial factor
causing the serrated AA stacking. A more in-depth analysis of the electrostatic
contribution reveals that the "classical" Coulomb repulsion between the
boroxine building blocks of COF-1 suggested by chemical intuition does exist,
but is overcompensated by attractive effects due to charge-penetration in the
phenylene units. The situation becomes more involved when additionally allowing
the interlayer distance to relax for each displacement, as then the different
distance-dependences of the various types of interactions come into play. The
overall behavior calculated for COF-1 is recovered for several additional COFs
with differently sized pi-systems and topologies, implying that the presented
results are of more general relevance.
