# 3D Molecules

Understanding molecular structure is a great challenge. In X-ray imaging, for instance, the experimentalist illuminates an object of interest, e.g. a molecule, and then collects the intensity of the diffracted rays, please see figure below for an illustrative setup. The two figures below show the schematic representation and the corresponding electron density maps for the Caffeine and Nicotine molecules: the density map is the 3D object we seek to infer. Here, we demonstrate the performance of the Wirtinger flow algorithm for recovering projections of 3D molecule density maps from simulated data. Figure: Schematic representation and electron density map of the Caﬀeine molecule. Figure: Schematic representation and electron density map of the Nicotine molecule.

Consider an experimental apparatus as in the first figure above. If we imagine that light propagates in the direction of the -axis, an approximate model for the collected data reads In other words, we collect the intensity of the diffraction pattern of the projection . The 2D image we wish to recover is thus the line integral of the density map along a given direction. As an example, the Caffeine molecule along with its projection on the -plane (line integral in the direction) is shown in the Figure below. Figure: Electron density of the Caffeine molecule along with its projection onto the -plane.

Now, if we let be the Fourier transform of the density , one can re-express the identity above as Therefore, by imputing the missing phase using phase retrieval algorithms, one can recover a slice of the 3D Fourier transform of the electron density map, i.e. . Viewing the object from different angles or directions gives us different slices. One can then recover the 3D Fourier transform of the electron density map from all these slices and, in turn, the 3D electron density map.

We now generate observation planes by rotating the -plane around the -axis by equally spaced angles in the interval . Each of these planes is associated with a 2D projection of size , giving us 20 coded diffraction octanary patterns (we use the same patterns for all 51 projections). We run the Wirtinger flow algorithm. The figure below reports the average relative error over the 51 projections and the total computational time required for reconstructing all 51 images.

Caffeine molecule: Mean rel. error is ; Total time is hours.