**Abstract** : X-ray analysis plays the leading role among the experimental methods of determination of three-dimensional structure of biological macromolecules. The history of the method starts in the very beginning of the 20th century with the determination of the structure of simplest inorganic compounds comprised of a few atoms. The emerging of computers in the second half of the century made it possible to determine first protein structures composed of about 1000 atoms. The end of the century was marked by about 10000 protein structures determined, and by the first results concerning the structure of ribosomal particles composed from more than 100000 atoms. The amount of experimental information (collected for a particular molecule) reaches millions of independent measurements and, obviously, only most powerful computer systems give a chance to operate with such objects. Recently started `Structural genomics' projects require the determination of thousands of new protein structures and impose heavy demands to development of mathematical and computing tools of X-ray crystallography. Depending on the size of the studied object and the quality of experimental information, two goals may be considered as the final goal of structure determination. The first one is the precise determination of the distribution in the space of free electrons. Such studies are mostly underway for small compounds (while first tests with protein structures were performed last years). The usual final goal in protein crystallography is to build up an atomic model, i.e., to find three-dimensional coordinates of all (thousands) atoms composing the molecule. The cinematic theory of scattering of X-rays allows the calculation of intensities of the diffracted waves provided the atomic coordinates are known. This makes it possible to represent the problem of structure determination as a least-squares problem. Nevertheless the high dimensionality of the space of minimisation permits such a direct approach (structure refinement) only at the latest stages of structure determination, when there exists a good enough preliminary atomic model. The usual way to obtain such a model is to find first an approximate density distribution and then to interpret it in terms of an atomic model. The conventional X-ray experiment allows measuring of magnitudes of the complex Fourier coefficients of the electron density distribution, while their phases are lost in the experiment. The determination of the phase values of these coefficients forms the central problem of X-ray crystallography. This problem is usually solved by means of expensive additional experimental work or by some mathematical approaches. These latter are referred to as direct or ab-initio methods. Some of them will be discussed in the paper. Once found, the phase values together with the experimental magnitudes may be used for calculating the Fourier series, which approximates the density distribution.