  Twisting bilayers of transition metal dichalcogenides (TMDs) gives rise to a
periodic moir\'{e} potential resulting in flat electronic bands with localized
wavefunctions and enhanced correlation effects. In this work, scanning
tunneling microscopy is used to image a WS$_{2}$ bilayer twisted approximately
$3^{\circ}$ off the antiparallel alignment. Scanning tunneling spectroscopy
reveals the presence of localized electronic states in the vicinity of the
valence band onset. In particular, the onset of the valence band is observed to
occur first in regions with a Bernal stacking in which S atoms are located on
top of each other. In contrast, density-functional theory calculations on
twisted bilayers which have been relaxed in vacuum predict the highest lying
flat valence band to be localized in regions of AA' stacking. However,
agreement with the experiment is recovered when the calculations are carried
out on bilayers in which the atomic displacements from the unrelaxed positions
have been reduced reflecting the influence of the substrate and finite
temperature. This demonstrates the delicate interplay of atomic relaxations and
the electronic structure of twisted bilayer materials.
