Basic biochemical mechanisms fundamental to human health arise from understanding the structure of large biological molecules, both proteins and nucleic acids. X-ray crystallography has been a key method for uncovering their structure and function. This project will develop computational methods needed to enable the use of serial X-ray crystallography techniques. Serial crystallography, performed at either third generation synchrotron beamlines or X-ray free-electron lasers (XFEL), is emerging as a way to determine molecular structure using crystals that are probed once with a short X-ray pulse and then exchanged for a new sample. This a departure from traditional single-crystal experiments where the crystal is rotated in the beam to assemble a full data set, but which require large crystals, coupled with cryocooling to slow down the effects of radiation damage. Serial crystallography, in contrast, is performed with an extremely short X-ray pulse, which probes the structure before radiation damage occurs, and at normal physiological temperatures, where the full range of available molecular conformations can be revealed. The software toolkits DIALS (Diffraction Integration for Advanced Light Sources) and CCTBX (Computational Crystallography Toolbox) extract information from the diffraction pattern consisting of Bragg spots, the analysis of which eventually leads to molecular structure. This proposal re-examines the established data processing patterns that have existed for many decades, and favors new models that are specifically customized for serial crystallography, making systematic corrections to the measurements that have not previously been treated properly. This will lead to improved accuracy, even to the level of locating a single electron in a protein. Software will be deployed in cooperation with several XFEL lightsources worldwide including but not limited to LCLS (Stanford), EuXFEL (Germany), and SwissFEL (Switzerland), and at several synchrotron sources such as SSRL (Stanford), ESRF (France), and Diamond (UK). Code will be distributed in an open source, community-oriented software architecture that can be adapted by beamline scientists to accommodate new instrumentation, in a field where rapid hardware advances are expected to continue for many years.