We use ab initio modeling (CASTEP) to help elucidate the crystallization phenomena and chemistry behind kidney stone composition and formation. To explore the stone formation process, we have constructed a surface model of calcium oxalate dihydrate-the mineral most commonly found in patients with hypercalciuria and modeled stone growth, by simulating further calcium oxalate adsorption onto the surface (-7.446 eV, -0.065 eV/atom). Furthermore, urine analysis of kidney stone patients has previously revealed that their urine contains higher concentrations of phospholipids compared to healthy individuals. Therefore, to investigate the interactions between urinary macromolecules and the growing crystal surfaces at an atomic level, we have performed ab initio molecular dynamics simulations of phosphocholine adsorption on calcium oxalate surfaces. We have shown that the phosphocholine headgroups become entrapped within the growing crystal and the lowest energy structures (-18.008 eV, -0.0396 eV/atom) are those where the calcium oxalate dihydrate surfaces have become disrupted, with reorganization of their crystallographic structure. Urinary calculi (kidney stones) are a common ailment affecting around 10% of the world's population and resulting in nearly 90,000 finished consultant episodes (FCE) each year in the United Kingdom [Hospital Episode Statistics, Admitted Patient Care-England, 2011-12 NHS Digital, 2021-2022. https://digital.nhs.uk/data-and-information/publications/statistical/hospital-admitted-patient-care-activity/hospital-episode-statistics-admitted-patient-care-england-2011-12].