Available online at www.sciencedirect.com ScienceDirect Physics Procedia 84 (2016) 315 – 320 International Conference "Synchrotron and Free electron laser Radiation: generation and application", SFR-2016, 4-8 July 2016, Novosibirsk, Russia Some aspects of crystal centering during X-ray high-throughput protein crystallography experiment Yu.A.Gaponov a,*, N.Matsugaki b, K.Sasajima b, N.Igarashi b, S.Wakatsuki c a Department of atmospheric research, Novosibirsk State University, Pirogova 2, Novosibirsk, 630090, Russia Structural Biology Research Center, High Energy Accelerator Research Organization, 1-1 Oho, Tsukuba, 305-0801, Japan c Stanford University, Stanford, California, 94305, USA b Abstract A set of algorithms and procedures of a crystal loop centering during X-ray high-throughput protein crystallography experiment has been designed and developed A simple algorithm of the crystal loop detection and preliminary recognition has been designed and developed The crystal loop detection algorithm is based on finding out the crystal loop ending point (opposite to the crystal loop pin) using image cross section (digital image column) profile analysis The crystal loop preliminary recognition procedure is based on finding out the crystal loop sizes and position using image cross section profile analysis The crystal loop fine recognition procedure based on Hooke-Jeeves pattern search method with an ellipse as a fitting pattern has been designed and developed The procedure of restoring missing coordinate of the crystal loop is described Based on developed algorithms and procedures the optimal auto-centering procedure has been designed and developed A procedure of optimal manual crystal centering (Two Clicks Procedure) has been designed and developed Developed procedures have been integrated into control software system PCCS installed at crystallography beamlines Photon Factory BL5A and PF-AR NW12, KEK © Published by Elsevier B.V.B.V This is an open access article under the CC BY-NC-ND license © 2016 2016The TheAuthors Authors Published by Elsevier (http://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the organizing committee of SFR-2016 Peer-review under responsibility of the organizing committee of SFR-2016 Keywords: X-ray crystallography; high-throughput protein crystallography; control system; SR; object detection and recognition; Linux * Corresponding author Tel.: +7-913-065-8195 E-mail address: yurii3000@gmail.com 1875-3892 © 2016 The Authors Published by Elsevier B.V This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the organizing committee of SFR-2016 doi:10.1016/j.phpro.2016.11.053 316 Yu.A Gaponov et al / Physics Procedia 84 (2016) 315 – 320 Introduction Crystal centering procedure is important part of X-ray protein crystallography experiment A typical protein crystal holder is tiny nylon loop with a size about 50÷500μm A typical protein crystal size is about 40÷400μm It takes several minutes to center manually protein crystal under investigation after mounting crystal holder onto X-ray beam area In contrast, to center the crystal automatically during the X-ray high-throughput protein crystallography experiment becomes not simple procedure There are several steps of centering the crystal as it was described by Karain et al (2002) and Pauluhn et al (2011) Steps typically include several consequent detections, recognitions, rotations around goniometer axis and shifts along coordinate axes using data analysis of the X-ray beam area optical images with different magnification of monitoring optical system In the case, when the crystal size is about the crystal loop size, centering procedure is completed after centering the crystal loop In the case, the crystal is smaller than the crystal loop, crystal centering procedure is started, which is similar to crystal loop centering procedure but more complicated and less reliable The step of detection and recognition of the crystal loop and the crystal in the loop is crucial in the centering procedure There are several approaches to solve the problem One of it, as it was described by Roth et al (2002) and Jain et al (2007), is image analysis using digital filters to reduce the image noise and to determine image pixel’s intensity gradient or standard deviation of the intensity to detect crystal loop, crystal edges and crystal corners Another approach, as it was described by Pauluhn et al (2011), is calculation of ratio of black and white pixels of preliminary converted image onto black and white mode to find the boundaries of the crystal loop Nevertheless all algorithms have some percentage of fault cases of centering and the problem of crystal loop and crystal centering still is actual In this report we describe simple algorithm of crystal loop detection and preliminary recognition based on profile analysis of optical image cross-section curves A procedure of crystal loop fine recognition using Hooke-Jeeves pattern search method with an ellipse as a fitting pattern has been designed and developed An optimal manual crystal centering procedure (Two Clicks Procedure) is described Crystal loop centering Schematically the optical image of the X-ray beam area is defined as shown at Fig.1a The goniometer is on the left side of the optical image of X-ray beam area Goniometer axis Gaxis coincides with axis X of optical image of the X-ray beam area and crosses X-ray beam Coordinate axes X and Y of the X-ray beam area coincides with coordinate axes X and Y of the optical image Coordinate origin of the X-ray beam area coincides with coordinate origin of the optical image and is in the center of the optical image The X-ray beam crosses coordinate origin of the optical image Crystal loop centering algorithm is based on finding coordinates (xcp, ycp, zcp) of some centering point of the crystal loop Two coordinates (xcp, ycp) can be obtained using the optical image of the X-ray beam area directly by clicking the mouse pointer onto the centering point of the crystal loop (manual centering mode) or automatically (auto-centering mode) Unknown centering point coordinate zc can be obtained after solving the geometric task with a set of two XY point coordinates before and after rotation the crystal loop by angle α=90° around the axis X using right screw along the positive direction of the axis X, as it is described in Korn and Korn (1968): ݔ ͳ ൭ݕ ൱ ൌ ൭Ͳ ݖ Ͳ Ͳ ܿߙ ݏ ߙ ݊݅ݏ ݔ ݔ Ͳ ݕ െݖ െ ߙ ݊݅ݏ൱ ൭ ൱ ൌ ൭ ൱, ݖ ݕ ܿߙ ݏ (1) where (xcp, ycp, zcp), (xcpr, ycpr, zcpr) – centering point coordinates before and after the crystal loop rotation Other two coordinates (xcpr, ycpr) are obtained in the same manner as coordinates (xcp, ycp) at previous step The unknown coordinate zc is defined from (2): ݖ ൌ െݕ , (2) 317 Yu.A Gaponov et al / Physics Procedia 84 (2016) 315 – 320 At the next step the goniometer XYZ shifting mechanism shifts the crystal loop into the X-ray beam position (0, 0, 0) with shift vector rsh=(-xcp, -ycp, -zcp) a) b) c) Fig The steps of crystal loop detection and crystal loop preliminary recognition: (a) the optical image of the X-ray beam area schematic view, (b) the step of crystal loop ending point detection, (c) the step of crystal loop preliminary recognition Crystal loop detection The noise of the X-ray beam area optical image is reduced by convolution of the image pixels with a simple matrix: ͲǤͳ K=ͲǤͳ ͲǤͳ ͲǤͳ ͲǤʹ ͲǤͳ ͲǤͳ ͲǤͳ൩ ͲǤͳ (3) It is assumed that the optical image mode is grayscale one Typically, crystal loop intensity is lower than the intensity of the image background In this case, the pixel’s intensity of optical image is inverted according to relation Iij inv = Iij max - Iijǡwhere Iij max – the biggest value of pixel’s intensity of the image (see Fig.1a, b) It is assumed that at right side of the image nothing should be observed except crystal loop oriented approximately along axis X That is why crystal loop detection starts finding out the crystal loop from the right side of the image (the opposite side to the crystal pin side, which is on the left) The analysis starts from the right side of the optical image, taken at lowest possible magnification of optical system after mounting the crystal loop at the goniometer 318 Yu.A Gaponov et al / Physics Procedia 84 (2016) 315 – 320 Crystal loop ending point detection algorithm is based on analysis of optical image columns one by one starting from the right side of the optical image The analysis stops when a profile with some intensity Ie will be recognized at some coordinate ye That assumed to be the crystal loop ending point (see Fig.1b) with coordinates (xe, ye) Then using the goniometer XYZ shifting mechanism the crystal loop is shifted into the center of optical image position (0, 0) using shift vector rsh=(-xe, -ye) The step of finding the crystal loop ending point is repeated until the physical crystal loop ending point will be find out (just after mounting the crystal loop might be partly out of the optical image) and moved into the center of optical image Finally, the crystal loop ending point is centered with use of the crystal loop centering algorithm After that, the crystal loop ending point is assumed to be mounted into the X-ray beam position Crystal loop recognition At the step of crystal loop preliminary recognition, the sizes and position of gravity center of the crystal loop are determined The image columns are analyzed to calculate the crystal loop ݕ-width within the crystal loop ending point (xe, ye) of the crystal loop ending point For this purpose, intensity of pixels in column is checked from upper side of the image to the bottom Checking is stopped at some coordinate yupp, when the intensity of the pixel will be within the registered at previous step intensity Ie Then the intensity of pixels in the same column is checked from bottom side of the image to upper Checking is stopped at some coordinate ylow, when the intensity of the pixel will be within the registered at previous step intensity Ie The crystal loop ywidth is defined as ywidth = (yupp - ylow) The crystal loop center position Y-coordinate ycp is defined as ycp = (yupp + ylow)/2 The crystal loop xwidth is defined as xwidth ≈ -2xcur, where xcur is the current coordinate of image column under analysis The crystal loop center position X-coordinate xcp is defined as xcp ≈ -xwidth The image columns are analyzed until the value of ywidth stops to increase within the condition xwidth