Using molecular simulations and theory, we develop an explicit mapping of the contribution of molecular relaxation modes in glassy thermosets to the shear modulus, where the relaxations were tuned by altering the polarity of side groups. Specifically, motions at the domain, segmental, monomer, and atomic levels are taken from molecular dynamics snapshots and directly linked with the viscoelasticity through a framework based in the lattice dynamics of amorphous solids. This unique approach provides direct insight into the roles of chemical groups in the stress response, including the time scale and spatial extent of relaxations during mechanics. Two thermoset networks with differing concentrations of polar side groups were examined, dicyclopentadiene (DCPD) and 5-norbornene-2-methanol (NBOH). A machine learning method is found to be effective for quantifying large-scale correlated motions, while more local chemical relaxations are readily identified by direct inspection. The approach is broadly applicable and enables rapid predictions of the frequency-dependent modulus for any glass.