Current Role at Stanford


Computational staff scientist at the Stanford Synchrotron Radiation Lightsource (SSRL), in the Macromolecular Crystallography group (Structural and Molecular Biology division).

Main activities revolve around a 3 year BRaVE-funded project to build a new X-ray resource for the acceleration of medicines development (XMeD). Active in-silico areas of research are in the characterization of crystallization outcomes, virtual and experimental screening of ligands, in-silico methods for lead molecule optimization, and extremely sensitive absorption profile characterization using machine learning techniques. A major computational goal is to determine the most valuable tools (and develop new ones) for future XMeD users.

Beyond XMeD, we are focusing on using GPUs and machine learning models to accelerate processing and characterization of user diffraction data that is collected at SSRL beamlines 12-1, 12-2, 14-1, and 9-2. In addition, we are aiming to make available to users new methods that process X-ray diffraction data at the pixel-level in order to extract more information to better resolve structural changes in proteins arising from e.g., binding events and light/chemical driven dynamics.

We are also partnering with NERSC to build a framework for our beamline users to offload computationally intensive jobs to the Perlmutter GPU cluster.

Education & Certifications


  • BS, University of Texas at San Antonio, Physics, Math (2010)
  • PhD, Stanford University, Applied Physics (2017)

Personal Interests


Diffraction AI: https://smb.slac.stanford.edu/~resonet/
EasyBragg diffraction simulators for Python: https://smb.slac.stanford.edu/~dermen/easybragg/
The last question: https://users.ece.cmu.edu/~gamvrosi/thelastq.html

All Publications


  • Deep residual networks for crystallography trained on synthetic data. Acta crystallographica. Section D, Structural biology Mendez, D., Holton, J. M., Lyubimov, A. Y., Hollatz, S., Mathews, I. I., Cichosz, A., Martirosyan, V., Zeng, T., Stofer, R., Liu, R., Song, J., McPhillips, S., Soltis, M., Cohen, A. E. 2024

    Abstract

    The use of artificial intelligence to process diffraction images is challenged by the need to assemble large and precisely designed training data sets. To address this, a codebase called Resonet was developed for synthesizing diffraction data and training residual neural networks on these data. Here, two per-pattern capabilities of Resonet are demonstrated: (i) interpretation of crystal resolution and (ii) identification of overlapping lattices. Resonet was tested across a compilation of diffraction images from synchrotron experiments and X-ray free-electron laser experiments. Crucially, these models readily execute on graphics processing units and can thus significantly outperform conventional algorithms. While Resonet is currently utilized to provide real-time feedback for macromolecular crystallography users at the Stanford Synchrotron Radiation Lightsource, its simple Python-based interface makes it easy to embed in other processing frameworks. This work highlights the utility of physics-based simulation for training deep neural networks and lays the groundwork for the development of additional models to enhance diffraction collection and analysis.

    View details for DOI 10.1107/S2059798323010586

    View details for PubMedID 38164955

  • Beyond integration: modeling every pixel to obtain better structure factors from stills. IUCrJ Mendez, D., Bolotovsky, R., Bhowmick, A., Brewster, A. S., Kern, J., Yano, J., Holton, J. M., Sauter, N. K. 2020; 7 (Pt 6): 1151–67

    Abstract

    Most crystallographic data processing methods use pixel integration. In serial femtosecond crystallography (SFX), the intricate interaction between the reciprocal lattice point and the Ewald sphere is integrated out by averaging symmetrically equivalent observations recorded across a large number (104-106) of exposures. Although sufficient for generating biological insights, this approach converges slowly, and using it to accurately measure anomalous differences has proved difficult. This report presents a novel approach for increasing the accuracy of structure factors obtained from SFX data. A physical model describing all observed pixels is defined to a degree of complexity such that it can decouple the various contributions to the pixel intensities. Model dependencies include lattice orientation, unit-cell dimensions, mosaic structure, incident photon spectra and structure factor amplitudes. Maximum likelihood estimation is used to optimize all model parameters. The application of prior knowledge that structure factor amplitudes are positive quantities is included in the form of a reparameterization. The method is tested using a synthesized SFX dataset of ytterbium(III) lysozyme, where each X-ray laser pulse energy is centered at 9034 eV. This energy is 100 eV above the Yb3+ L-III absorption edge, so the anomalous difference signal is stable at 10 electrons despite the inherent energy jitter of each femtosecond X-ray laser pulse. This work demonstrates that this approach allows the determination of anomalous structure factors with very high accuracy while requiring an order-of-magnitude fewer shots than conventional integration-based methods would require to achieve similar results.

    View details for DOI 10.1107/S2052252520013007

    View details for PubMedID 33209326

  • Angular correlations of photons from solution diffraction at a free-electron laser encode molecular structure IUCRJ Mendez, D., Watkins, H., Qiao, S., Raines, K. S., Lane, T. J., Schenk, G., Nelson, G., Subramanian, G., Tono, K., Joti, Y., Yabashi, M., Ratner, D., Doniach, S. 2016; 3: 420-429

    Abstract

    During X-ray exposure of a molecular solution, photons scattered from the same molecule are correlated. If molecular motion is insignificant during exposure, then differences in momentum transfer between correlated photons are direct measurements of the molecular structure. In conventional small- and wide-angle solution scattering, photon correlations are ignored. This report presents advances in a new biomolecular structural analysis technique, correlated X-ray scattering (CXS), which uses angular intensity correlations to recover hidden structural details from molecules in solution. Due to its intense rapid pulses, an X-ray free electron laser (XFEL) is an excellent tool for CXS experiments. A protocol is outlined for analysis of a CXS data set comprising a total of half a million X-ray exposures of solutions of small gold nanoparticles recorded at the Spring-8 Ångström Compact XFEL facility (SACLA). From the scattered intensities and their correlations, two populations of nanoparticle domains within the solution are distinguished: small twinned, and large probably non-twinned domains. It is shown analytically how, in a solution measurement, twinning information is only accessible via intensity correlations, demonstrating how CXS reveals atomic-level information from a disordered solution of like molecules.

    View details for DOI 10.1107/S2052252516013956

    View details for Web of Science ID 000387257600006

    View details for PubMedID 27840681

    View details for PubMedCentralID PMC5094444

  • Observation of correlated X-ray scattering at atomic resolution. Philosophical transactions of the Royal Society of London. Series B, Biological sciences Mendez, D., Lane, T. J., Sung, J., Sellberg, J., Levard, C., Watkins, H., Cohen, A. E., Soltis, M., Sutton, S., Spudich, J., Pande, V., Ratner, D., Doniach, S. 2014; 369 (1647)

    Abstract

    Tools to study disordered systems with local structural order, such as proteins in solution, remain limited. Such understanding is essential for e.g. rational drug design. Correlated X-ray scattering (CXS) has recently attracted new interest as a way to leverage next-generation light sources to study such disordered matter. The CXS experiment measures angular correlations of the intensity caused by the scattering of X-rays from an ensemble of identical particles, with disordered orientation and position. Averaging over 15 496 snapshot images obtained by exposing a sample of silver nanoparticles in solution to a micro-focused synchrotron radiation beam, we report on experimental efforts to obtain CXS signal from an ensemble in three dimensions. A correlation function was measured at wide angles corresponding to atomic resolution that matches theoretical predictions. These preliminary results suggest that other CXS experiments on disordered ensembles-such as proteins in solution-may be feasible in the future.

    View details for DOI 10.1098/rstb.2013.0315

    View details for PubMedID 24914148

  • Real-time XFEL data analysis at SLAC and NERSC: A trial run of nascent exascale experimental data analysis CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE Blaschke, J. P., Brewster, A. S., Paley, D. W., Mendez, D., Bhowmick, A., Sauter, N. K., Kroger, W., Shankar, M., Enders, B., Bard, D. 2024; 36 (12)

    View details for DOI 10.1002/cpe.8019

    View details for Web of Science ID 001160754200001

  • Accelerating x-ray tracing for exascale systems using Kokkos CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE Wittwer, F., Sauter, N. K., Mendez, D., Poon, B. K., Brewster, A. S., Holton, J. M., Wall, M. E., Hart, W. E., Bard, D. J., Blaschke, J. P. 2024; 36 (5)

    View details for DOI 10.1002/cpe.7944

    View details for Web of Science ID 001091883700001

  • Interpreting macromolecular diffraction through simulation. Methods in enzymology Young, I. D., Mendez, D., Poon, B. K., Blaschke, J. P., Wittwer, F., Wall, M. E., Sauter, N. K. 2023; 688: 195-222

    Abstract

    This chapter discusses the use of diffraction simulators to improve experimental outcomes in macromolecular crystallography, in particular for future experiments aimed at diffuse scattering. Consequential decisions for upcoming data collection include the selection of either a synchrotron or free electron laser X-ray source, rotation geometry or serial crystallography, and fiber-coupled area detector technology vs. pixel-array detectors. The hope is that simulators will provide insights to make these choices with greater confidence. Simulation software, especially those packages focused on physics-based calculation of the diffraction, can help to predict the location, size, shape, and profile of Bragg spots and diffuse patterns in terms of an underlying physical model, including assumptions about the crystal's mosaic structure, and therefore can point to potential issues with data analysis in the early planning stages. Also, once the data are collected, simulation may offer a pathway to improve the measurement of diffraction, especially with weak data, and might help to treat problematic cases such as overlapping patterns.

    View details for DOI 10.1016/bs.mie.2023.06.011

    View details for PubMedID 37748827

  • Chemical crystallography by serial femtosecond X-ray diffraction. Nature Schriber, E. A., Paley, D. W., Bolotovsky, R., Rosenberg, D. J., Sierra, R. G., Aquila, A., Mendez, D., Poitevin, F., Blaschke, J. P., Bhowmick, A., Kelly, R. P., Hunter, M., Hayes, B., Popple, D. C., Yeung, M., Pareja-Rivera, C., Lisova, S., Tono, K., Sugahara, M., Owada, S., Kuykendall, T., Yao, K., Schuck, P. J., Solis-Ibarra, D., Sauter, N. K., Brewster, A. S., Hohman, J. N. 1800; 601 (7893): 360-365

    Abstract

    Inorganic-organic hybrid materials represent a large share of newly reported structures, owing to their simple synthetic routes and customizable properties1. This proliferation has led to a characterization bottleneck: many hybrid materials are obligate microcrystals with low symmetry and severe radiation sensitivity, interfering with the standard techniques of single-crystal X-ray diffraction2,3 and electron microdiffraction4-11. Here we demonstrate small-molecule serial femtosecond X-ray crystallography (smSFX) for the determination of material crystal structures from microcrystals. We subjected microcrystalline suspensions to X-ray free-electron laser radiation12,13 and obtained thousands of randomly oriented diffraction patterns. We determined unit cells by aggregating spot-finding results into high-resolution powderdiffractograms. After indexing the sparse serial patterns by a graph theory approach14, the resulting datasets can be solved and refined using standard tools for single-crystal diffraction data15-17. We describe the ab initio structure solutions of mithrene (AgSePh)18-20, thiorene (AgSPh) and tethrene (AgTePh), of which the latter two were previously unknown structures. In thiorene, we identify a geometric change in the silver-silver bonding network that is linked to its divergent optoelectronic properties20. We demonstrate that smSFX can be applied as a general technique for structure determination of beam-sensitive microcrystalline materials at near-ambient temperature and pressure.

    View details for DOI 10.1038/s41586-021-04218-3

    View details for PubMedID 35046599

  • Untangling the sequence of events during the S2 S3 transition in photosystem II and implications for the water oxidation mechanism. Proceedings of the National Academy of Sciences of the United States of America Ibrahim, M., Fransson, T., Chatterjee, R., Cheah, M. H., Hussein, R., Lassalle, L., Sutherlin, K. D., Young, I. D., Fuller, F. D., Gul, S., Kim, I., Simon, P. S., de Lichtenberg, C., Chernev, P., Bogacz, I., Pham, C. C., Orville, A. M., Saichek, N., Northen, T., Batyuk, A., Carbajo, S., Alonso-Mori, R., Tono, K., Owada, S., Bhowmick, A., Bolotovsky, R., Mendez, D., Moriarty, N. W., Holton, J. M., Dobbek, H., Brewster, A. S., Adams, P. D., Sauter, N. K., Bergmann, U., Zouni, A., Messinger, J., Kern, J., Yachandra, V. K., Yano, J. 2020

    Abstract

    In oxygenic photosynthesis, light-driven oxidation of water to molecular oxygen is carried out by the oxygen-evolving complex (OEC) in photosystem II (PS II). Recently, we reported the room-temperature structures of PS II in the four (semi)stable S-states, S1, S2, S3, and S0, showing that a water molecule is inserted during the S2 S3 transition, as a new bridging O(H)-ligand between Mn1 and Ca. To understand the sequence of events leading to the formation of this last stable intermediate state before O2 formation, we recorded diffraction and Mn X-ray emission spectroscopy (XES) data at several time points during the S2 S3 transition. At the electron acceptor site, changes due to the two-electron redox chemistry at the quinones, QA and QB, are observed. At the donor site, tyrosine YZ and His190 H-bonded to it move by 50 s after the second flash, and Glu189 moves away from Ca. This is followed by Mn1 and Mn4 moving apart, and the insertion of OX(H) at the open coordination site of Mn1. This water, possibly a ligand of Ca, could be supplied via a "water wheel"-like arrangement of five waters next to the OEC that is connected by a large channel to the bulk solvent. XES spectra show that Mn oxidation (tau of 350 s) during the S2 S3 transition mirrors the appearance of OX electron density. This indicates that the oxidation state change and the insertion of water as a bridging atom between Mn1 and Ca are highly correlated.

    View details for DOI 10.1073/pnas.2000529117

    View details for PubMedID 32434915

  • SAD phasing of XFEL data depends critically on the error model. Acta crystallographica. Section D, Structural biology Brewster, A. S., Bhowmick, A., Bolotovsky, R., Mendez, D., Zwart, P. H., Sauter, N. K. 2019; 75 (Pt 11): 959-968

    Abstract

    A nonlinear least-squares method for refining a parametric expression describing the estimated errors of reflection intensities in serial crystallographic (SX) data is presented. This approach, which is similar to that used in the rotation method of crystallographic data collection at synchrotrons, propagates error estimates from photon-counting statistics to the merged data. Here, it is demonstrated that the application of this approach to SX data provides better SAD phasing ability, enabling the autobuilding of a protein structure that had previously failed to be built. Estimating the error in the merged reflection intensities requires the understanding and propagation of all of the sources of error arising from the measurements. One type of error, which is well understood, is the counting error introduced when the detector counts X-ray photons. Thus, if other types of random errors (such as readout noise) as well as uncertainties in systematic corrections (such as from X-ray attenuation) are completely understood, they can be propagated along with the counting error, as appropriate. In practice, most software packages propagate as much error as they know how to model and then include error-adjustment terms that scale the error estimates until they explain the variance among the measurements. If this is performed carefully, then during SAD phasing likelihood-based approaches can make optimal use of these error estimates, increasing the chance of a successful structure solution. In serial crystallography, SAD phasing has remained challenging, with the few examples of de novo protein structure solution each requiring many thousands of diffraction patterns. Here, the effects of different methods of treating the error estimates are estimated and it is shown that using a parametric approach that includes terms proportional to the known experimental uncertainty, the reflection intensity and the squared reflection intensity to improve the error estimates can allow SAD phasing even from weak zinc anomalous signal.

    View details for DOI 10.1107/S2059798319012877

    View details for PubMedID 31692470

    View details for PubMedCentralID PMC6834081

  • High-viscosity injector-based pink-beam serial crystallography of microcrystals at a synchrotron radiation source. IUCrJ Martin-Garcia, J. M., Zhu, L., Mendez, D., Lee, M. Y., Chun, E., Li, C., Hu, H., Subramanian, G., Kissick, D., Ogata, C., Henning, R., Ishchenko, A., Dobson, Z., Zhang, S., Weierstall, U., Spence, J. C., Fromme, P., Zatsepin, N. A., Fischetti, R. F., Cherezov, V., Liu, W. 2019; 6 (Pt 3): 412-425

    Abstract

    Since the first successful serial crystallography (SX) experiment at a synchrotron radiation source, the popularity of this approach has continued to grow showing that third-generation synchrotrons can be viable alternatives to scarce X-ray free-electron laser sources. Synchrotron radiation flux may be increased ∼100 times by a moderate increase in the bandwidth ('pink beam' conditions) at some cost to data analysis complexity. Here, we report the first high-viscosity injector-based pink-beam SX experiments. The structures of proteinase K (PK) and A2A adenosine receptor (A2AAR) were determined to resolutions of 1.8 and 4.2 Å using 4 and 24 consecutive 100 ps X-ray pulse exposures, respectively. Strong PK data were processed using existing Laue approaches, while weaker A2AAR data required an alternative data-processing strategy. This demonstration of the feasibility presents new opportunities for time-resolved experiments with microcrystals to study structural changes in real time at pink-beam synchrotron beamlines worldwide.

    View details for DOI 10.1107/S205225251900263X

    View details for PubMedID 31098022

    View details for PubMedCentralID PMC6503920

  • Processing simultaneously collected MAD data from two closely spaced (90 eV) wavelengths measured at an X-ray free-electron laser Mendez, D., Weis, W., Brunger, A., Wakatsuki, S., Sauter, N. INT UNION CRYSTALLOGRAPHY. 2019: A244