Understanding how macroscopic properties depend on intermolecular interactions for complex fluid systems is an enormous challenge in statistical mechanics. This issue is of particular importance for designing optimal industrial fluid formulations such as responsive oilfield fluids, based on viscoelastic surfactant solutions. We have carried out extensive molecular dynamics simulations, resolving the full chemical details in order to study how the structure of the lamellar phase of viscoelastic surfactant solutions depends on the head group (HG) chemistry of the surfactant. In particular, we consider anionic carboxylate and quaternary ammonium HGs with erucyl tails in aqueous solutions together with their sodium and chloride counterions at room temperature. We find a strong HG dependence of the lamellar structure as characterized by suitable pair correlation functions and density distributions. The depth of penetration of water into the bilayer membrane, the nature of counterion condensation on the HGs and even the order and correlation of the tails in the lamellae depend sensitively on the chemical details of the HG. We also determine the compressibility of the lamellar system as a first step to using atom-resolved molecular dynamics in order to link the molecular and macroscopic scales of length and time. The results give important insight into the links between molecular details and surfactant phase structure which is being exploited to develop more systematic procedures for the molecular design and formulation of industrial systems.