  Phenalenyl (C$_{13}$H$_9$) is an open-shell spin-$1/2$ nanographene. Using
scanning tunneling microscopy (STM) inelastic electron tunneling spectroscopy
(IETS), covalently-bonded phenalenyl dimers have been shown to feature
conductance steps associated with singlet-triplet excitations of a spin-$1/2$
dimer with antiferromagnetic exchange. Here, we address the possibility of
tuning the magnitude of the exchange interactions by varying the dihedral angle
between the two molecules within a dimer. Theoretical methods, ranging from
density functional theory calculations to many-body model Hamiltonians solved
within different levels of approximation, are used to explain STM-IETS
measurements of twisted phenalenyl dimers on a h-BN/Rh(111) surface. By means
of first-principles calculations, we also propose strategies to induce sizable
twist angles in surface-adsorbed phenalenyl dimers via functional groups,
including a photoswitchable scheme. This work paves the way toward tuning
magnetic couplings in carbon-based spin chains and two-dimensional lattices.
