The geometrical features and electronic structure of molecular cluster models of two edge-sharing octahedrally coordinated cations, with and without a ring of six silica tetrahedra coupled to the two octahedra, were studied by means of ab initio molecular orbital calculations made with Hartree-Fock (at LANL2DZ and 6-311+G* levels) and Density Functional Theory (DFT) methods. These models represent different pairs of Al3+, Fe3+, Fe2+, and Mg2+ cations from the octahedral sheet of clays. The isomorphic substitution reactions of these cations in our molecular clusters were studied by means of isodesmic reactions. A tendency of Mg2+ to mix with Al3+ cations along the octahedral sheet was found, agrees with experimental results. A lower tendency of Fe3+ to mix with Al3+ was found in systems with only Al and Fe octahedral cations. However, the presence of Mg2+ catalyses the clustering of Fe3+ in Al/Fe/Mg samples, giving a cation ordering tendency similar to that found experimentally. The geometry and the hydrogen-bonding interactions of the OH groups were also studied. The ν(OH), δ(OH), and γ(OH) vibration mode frequencies were calculated and show good agreement with experimental values for ν(OH) and δ(OH), which suggests that this technique is a good predictive tool for γ(OH). The octahedral cation substitution effect on the vibrations of OH groups was calculated and reproduced the experimental behavior. The hydrogen-bonding interactions with tetrahedral O atoms are important for the ν(OH) frequency, but are not significant for δ(OH). These results show that the effect of the tetrahedral sheet on the OH groups is constant for the different cation pairs joined to these OH groups.