Global warming due to Carbon Dioxide (CO 2 ) emissions from fossil fuel consumption remains an extremely difficult problem to mitigate. One of the many purposed methods to tackle rising emissions of CO 2 is subsurface injection into geological formations known as Carbon Capture and Storage (CCS).A major challenge, that projects involving subsurface gas injection have, is predicting the amount of gas that will be trapped in the formation effectively and safely. A major contributing factor to this uncertainty is the lack of accurate experimental data on contact angles between the subsurface rocks, formation water and CO 2 . The two main difficulties with employing experimental work to estimate these parameters are the existence of partially contradicting results and the difficulty in accurately recreating the range of subsurface conditions in the laboratory. Molecular dynamics computer simulations provide a microscopic approach to recreate subsurface conditions and to explain experimental contradicting results.We report here molecular dynamics investigations on the influence of divalent salts on the CO 2 /water/quartz contact angle. We also investigate N 2 /water/quartz and H 2 S/water/quartz systems, in order to assess the impact that the gas has on the contact angles. The quartz surface used for these simulations was a fully coordinated quartz crystal. In addition, we present results for a hydroxylated quartz crystal model, which we have developed for this work. The dependence of the contact angles on the degree of hydroxylation is discussed.