v. ABs-axis (sql); layers shifted laterally by [0.5,0]=[0,0.5] UC. The shift changes to [±⅓,0] or [0,±⅓] for ZnPc-pz due to the bulky side chains (ABCs-axis). The most stable structure of ZnPc-pz. Due to the large discrepancy between PXRD patterns of as-synthesized and activated COF-1 and COF-5, we have modeled the presence of solvent by adding mesitylene molecules ("+mesi"), considering one mesitylene molecule per pore, the same number as the original experimental paper (= full coverage in ABC, Figure ). The solvent changes the ABCe/s structure, preventing layer corrugation. This affects stacking energetics considerably; in COF-1, ABCe and ABe become isoenergetic, while being more stable than AAs, whereas in COF-5 AAs is preferred (Table ). To obtain realistic LCOF structure models, we first create a set of all possible interlayer shifts using Maxwell-Boltzmann distribution of their relative energies (at the synthesis temperature ).