Sample preparation

Crystals of HEWL were grown by the rapid-mixing batch method31. Crystals with sizes of between 6 and 8 µm in diameter were obtained by adding three parts of precipitant (1 M NaCl, 40%(v/v) ethylene glycol, 15%(w/v) PEG 4000, 50 mM acetate buffer pH 3.5 filtered through a 450 nm filter) to one part of HEWL (Sigma–Aldrich; dissolved to 126 mg/mL in 50 mM acetate buffer pH 3.5 and filtered through a 100 nm filter) at 1 °C (ThermoStat C, Eppendorf, Germany). The resulting mixture was immediately subjected to rapid mixing and incubated for 30 min at 1 °C32. Crystal sizes were estimated through image analysis by optical microscopy. Crystals were resuspended before injection to yield a homogenous suspension of HEWL microcrystals.

For the CTX-M-14 β-lactamase the gene was cloned into a pRSET A plasmid and transformed into competent Escherichia coli BL21DE3 cells (Bl21(DE3) pLyS, Novagen, Schwalbach, Germany). Chromosomal DNA from clinical K. pneumoniae DT1 (GenBank CP019077.1) served as a template. The amplicon was cloned into pCR4 and introduced into E. coli TOP10 cells (Invitrogen), giving E. coli TOP10 x pCR4::blaCTX-M-14. TOP10 x pCR4::blaCTX-M-14 was used to isolate CTX-M14. The primers used to amplify blaCTX-M14 were Prom-CTX-M14-for GCCAAAAGTTATTCTACACTCACT and CTX-M14-rev TTACAGCCCTTCGGCGATG. BL21DE3 cell were grown in LB medium at 37 °C containing 100 µg/mL ampicillin for plasmid selection. Gene expression was induced by supplementation of IPTG (isopropyl β-d-1-thiogalactopyranoside) to a final concentration of 1 mM at an optical density (OD) of 0.7. Cells were harvested 3 h after induction by centrifugation with 4000 × g at 4 °C. The cell pellet was resuspended in 20 mM MES pH 6 and sonicated for lysis. Cell debris were separated by centrifugation at 17000 × g for 1 h at 4 °C. Supernatant was supplemented by addition of 1 µl DNase and dialyzed overnight against a large volume of 20 mM MES pH 6 at 4 °C. Dialyzed sample was filtered using a 0.2 µm syringe filter and applied onto a cation exchange column (HiTrap SP XL) using a Äkta Pure chromatography system. The column was prequilibrated with 20 mM MES pH 6 and CTX-M-14 was eluted using a gradient over 20 column volumes with 50 mM NaCl, 20 mM MES pH 6. Elution peak was concentrated using a 10 kDa Amicon concentrator to a final CTX-M-14 concentration of 20 mg/mL. CTX-M-14 microcrystals for SFX were produced using a seeding approach. Crystals were grown by sitting drop vapor diffusion at 20 °C overnight mixing 1 µL CTX-M-14 at 20 mg/mL and 1 µL precipitant (40% PEG8000, 200 mM lithium sulfate, 100 mM sodium acetate). Obtained crystals (space group P2 1 2 1 2 1 ) were crushed and a seed stock was prepared. To obtain microcrystals the undiluted seed stock was used for batch crystallization setups by mixing volumes of 50% CTX-M-14 with 10% undiluted seed stock and 40% precipitant solution. Resulting microcrystals were centrifuged at 200 × g for 5 min and the pellet was crushed using a glass tissue homogenizer. This procedure was repeated 10 times and the supernatant of a final centrifugation step was used for two successive rounds of seed stock preparation, resulting in approximately 1 mL of highly concentrated seed stock that was used for following CTX-M-14 batch crystallization setups. CTX-M-14 microcrystals prepared by this approach grew within 1 h and had a homogeneous size distribution ranging from 3 to 8 µm, scored by light microscopy. Prior to sample loading into the reservoir container the crystal suspension was filtered using a 20 µm gravity flow filter and mixed at this time with avibactam to obtain a final avibactam concentration of 20 mM.

Fast jets

Delivery of suspensions of crystal solution followed the principle of a gas dynamic virtual nozzle33,34,35 in which a liquid stream is focused and accelerated by the virtual orifice created by a co-propagating helium gas flow. The sample was delivered to the injector using a syringe approach in which a high-pressure liquid chromatography (HPLC) pump (Shimadzu) delivered water to drive the plunger in a sample reservoir, forcing sample through a syringe into the injector lines. The pump delivers a constant flow even at high pressures and thus allows for stable and steady delivery of the sample suspension. The sample flow rate was additionally monitored by a liquid flow meter (Sensirion) located in the water stream between the HPLC pump and the sample syringe/reservoir. Gas flow was controlled using a GP1 gas pressure regulator (Proportion-air) and the flow rate was monitored with a gas flow meter (Bronkhorst). Nozzle tips were produced by three-dimensional (3D) printing36 following the design shown in Fig. 1. A 50 µm internal diameter injector sample line was used for improved stability with the crystal sizes used, placing an upper limit on achievable jet speed in this experiment. Three different conditions were chosen for sample delivery spanning the range of 50–100 m/s jet speed, significantly faster than previous jet velocities that were usually below 30 m/s37. Jet speeds were estimated during the experiment based on the flow conditions and known geometry of the 3D-printed nozzle, and subsequently verified by high-speed imaging in the laboratory using the same flow conditions as listed in Table 1. Laboratory measurement with both water and HEWL crystal suspension showed similar jet speeds, as reported in Table 1. The speed of the 25 m/s jet was calculated with less precision from movement of the X-ray-induced gaps at EuXFEL. No crystal diffraction data were collected with the 25 m/s jet. For simplicity in the main text and figures we refer to these conditions as jets with a speed of 100, 75, 50 and 25 m/s, values which retain physical meaning but do not over-estimate the stability of the jet speed over time.

Placement of injector nozzles near the XFEL interaction region was achieved using a “nozzle rod” mount provided by the EuXFEL sample environment group, providing the ability to optimize overlap between the focused X-ray beam and the sample-containing liquid jet. Interaction of the jet with the XFEL was imaged using an in-situ microscope with pulsed laser back illumination (Coherent Minilite-II, pulse duration of 3–5 ns for the frequency doubled 532 nm pulse) synchronized to the XFEL pulses similar to the arrangement in ref. 16. Jet explosion movies were collected using the higher pulse energy of the β-lactamase measurements.

SPB/SFX instrument

Experiments were performed at the SPB/SFX instrument at the European XFEL X-ray free-electron laser in September 2017 (HEWL) and April 2018 (CTX-M-14) as part of EuXFEL experiment p2012 using parameters as described in the main text. The size of the focal spot in the interaction region was estimated to be 16 µm ± 4 µm FWHM diameter based on optical imaging of single shots using Ce:YAG screens of various thicknesses (15, 20 and 50 µm). An analysis of the scattered signal on the detector suggests it is possible the actual focal spot was somewhat smaller in size. The liquid jets (described above) were positioned in the interaction region by mounting nozzles on a movable “nozzle rod” which held the jets just above the X-ray focal position and aligned to the X-ray beam using an in-line microscope viewing system. Diffraction from the sample was measured using an AGIPD 1M located 0.12 m downstream of the sample interaction region, with the direct beam passing through a central hole in the detector to a beam stop further downstream.

The AGIPD (Supplementary Figure 4) is a new charge integrating detector built for the European XFEL that is capable of measuring full frames at the EuXFEL pulse repetition rate. The AGIPD is designed to read out in burst mode because the EuXFEL delivers trains of X-ray pulses at MHz repetition rate, repeating at 10 Hz repetition rate. This experiment was performed with 30 pulses per burst at 1.1 MHz repetition rate. The EuXFEL design parameters extend to bursts of up to 2700 pulses at 4.5 MHz repetition rate, and thus each AGIPD pixel contains 352 analog memory cells which can be addressed at MHz repetition rates enabling the AGIPD to measure bursts of up to 352 individual X-ray pulses at MHz repetition rate. Subsequently, all memory cells are read out in the less than 100 ms before arrival of the next burst of X-ray pulses. This enables up to 352 pulses per train to be measured, or when fewer than 352 pulses populate a pulse train allows all pulses to be measured, as is this case here. The maximum frame rate of AGIPD is therefore 3520 frames per second matched to the EuXFEL pulse structure. Each pixel of AGIPD has three gain settings which are automatically selected on a frame-by-frame basis depending on the signal present in each pixel (Supplementary Figure 4). The AGIPD 1M detector used here consists of 16 tiles of 128 × 512 pixels each arranged as shown in Fig. 1 and Supplementary Figures 4 and 5. Calibration of the AGIPD readout requires measurement of the pedestal, gain and gain switching threshold for each of the three gain stages in each memory cell of each pixel. In this experiment the detector readout was initially limited to the first 15 X-ray pulses during instrument commissioning (HEWL), and later 30 pulses (CTX-M-14).

XFEL data analysis

Experiment progress was monitored online using OnDA38 for serial crystallography reading data in real time from the EuXFEL control system Karabo39 using the Karabo bridge40. Of the 749,874 diffraction patterns collected during HEWL data acquisition runs used for final analysis, 25,193 (3.4%) images were found by Cheetah24 to contain crystal diffraction (peakfinder8, minSNR = 8, minADC = 200, minPix = 2, minPeaks = 20). The same procedure was followed for CTX-M-14, except with the peakfinder8 parameters minSNR = 8, minADC = 250, minPix = 1, minPeaks = 20. Data from each AGIPD module was saved into separate files, and thus Cheetah24 was updated to match data from each of the 16 separate modules by train and pulse number. This ensured data was processed from the same X-ray pulse even in the presence of missing data frames, for example, if not all modules were present in the saved data for all train and pulse ID combinations. Data were read from uncalibrated (RAW_) data files in European XFEL format, and thus detector calibration was required. See Supplementary Figure 4 for operation of the AGIPD multiple-gain mode. AGIPD calibration was performed in Cheetah as follows: first the memory cell in use for the given Train ID and Pulse ID combination was determined, and then the recorded gain switch level was compared against the gain threshold for that memory cell to determine which gain mode the pixel was in for that particular measurement. The pedestal and gain correction for that memory cell and gain stage was then applied, and a per-memory cell and gain stage bad pixel mask was applied. Bad pixels were identified as statistical outliers in dark data sets and flagged to be ignored. The density of bad pixels across the detector areas used for analysis was 2.5% (Supplementary Figure 5). Calibration constants were obtained using software from both EuXFEL and the AGIPD detector consortium41. The output from Cheetah was stored in .cxi format for compatibility with downstream processing. Corrected data frames as well as raw data for both data sets have been deposited in the CXIDB.

SFX data processing

Indexing was done for both data sets applying CrystFEL v.0.6.3 to peaks found by Cheetah using the indexing packages MOSFLM42, DirAx43 and asdf26. Since detector panel locations were not measured to adequate precision before the experiment, lithium titanate powder diffraction rings were used for rough detector panel alignment followed by fine refinement from HEWL and CTX-M-14 diffraction data using geoptimiser44 and Slip-n-slide45. Combined with a 1% uncertainty in photon energy and uncertainty in the detector-to-sample distance, final indexing involved an iterative process with refinement of all unknown values using geoptimiser44. Indexing of multiple lattices per image sometimes resulted in a higher number of indexed lattices than number of input images. Merging and scaling of the Bragg peaks intensities were performed using partialator program from CrystFEL. To avoid the integration of noise for weakly scattering patterns, reflections were included up to 0.2 nm−1 above a conservative resolution estimate for each crystal (--push-res = 0.2) for both HEWL and CTX-M-14. Since the space group of the CTX-M-14 crystals (P 3 2 2 1) is merohedral and will exhibit indexing ambiguities, we processed the stream-file using ambigator in CrystFEL46 to resolve the indexing ambiguity before scaling and merging. MTZ-files for crystallographic data processing were generated from CrystFEL merged reflection data files using f2mtz of CCP447. Figures of merit were calculated using compare_hkl (Rsplit, CC 1/2 , CC*) and check_hkl (SNR, multiplicity, completeness), both a part of CrystFEL. The distribution of peak intensities and Wilson plot for the HEWL data set also reflect good data quality and dynamic range (Supplementary Figures 6 and 7).

Structure determination

A solvent-free version of the 4ET8 lysozyme structure2 and the solvent-free structure of the 5TWD β-lactamase structure18 were used each as a starting model for molecular replacement in Phaser48. Due to non-isomorphism of the collected data set with the data set in 4ET8 and 5TWD R free -flags were generated randomly using phenix.refine49 and the same set of R free -flags were then used throughout the refinement process. Initial refinement was carried out for both structures using phenix.refine, with all isotropic atomic displacement parameters set to 20 and using simulated annealing. This was followed by iterative cycles of restrained maximum-likelihood refinement using phenix.refine and manual model re-building using COOT50. Polygon51 and MolProbity52 were used for the validation of the final model.

To assess the quality of data we followed two separate approaches. In the first approach, firstly we calculated a composite simulated annealing omit map for the HEWL structure, using phenix.composite_omit_map27 (Supplementary Figure 2), and secondly we generated a polyAla-model of the final refined model, truncated residues 1–16 and 40–60 and used AutoBuild28 to see whether the final model could be rebuilt correctly and completely starting from just the X-ray-data and the truncated model (Supplementary Figure 2). Figures were generated using PyMOL. For CTX-M-14 the quality of the data and electron density was proven by the clear difference electron density of avibactam complexed in the active site, allowing an unambiguous interpretation of the inhibitor and identification of the covalent bond to OG of Ser70 of the β-lactamase.

Code availability

The versions of Cheetah and CrystFEL used in this work are available from the respective websites: https://www.desy.de/~barty/cheetah and https://www.desy.de/~twhite/crystfel.