The xnd program.


xnd top Next file Previous file

General information

In the present release of xnd it is possible to refine together diffraction patterns coming from different experiences (Bragg-Brentano X-ray, neutron, synchrotron). Each diagram may be polyphased and contain multiple wavelenghts. The different phases may be modelized entering their structures or, if this is unknown, simply entering the lattice parameters and Miller's indexes. If even lattice is unknown, the treatment can be achieved by entering d-spacing and integrated intensity for each peak. It is also possible to take care of anomalous scattering factors.

The programs allows the refinement of modulated structures (4-D): it is possible to describe both displacive and compositional modulation. The only limitation is that polarisation vectors may be expanded only to the first order Fourier term. The Fourier term is expressed in exponential form giving two parameters: the amplitude and the phase.

To simplify the treatment of data collected with linear counters possessing unequally spaced detectors and to treat variable step scans, the functions describing the profile are expressed using the measured angles. It should be noticed that the program will not calculate large peaks having the center falling at more than 1 degree in 2theta outside the collected region. The allowed Miller indexes hkl depend on the implementation of the short integer on the computer but run atleast between -127 and +127.

Method

The treatment of multiple diagrams, as in real time experiment, leads to the collection of a large number of diffraction patterns. Each diagram may have a poor statistical quality but the structural parameters obtained from these patterns are not independent. These considerations lead to a description of the crystallographic parameters by a polynomial expansion. The argument of this polynome is an external parameter, which will be called Temp. It is obvious that Temp is not necessarily the temperature but a magnetic, an electric field or anything else (time, pressure). The program is able to refine the whole set of diffraction patterns, minimizing the crystallographical parameters and their evolution vs. Temp. In the least-squares method the parameters at each cycle are obtained from the solution of the normal equation. Following the Marquardt method, a parameter can be added to each term in the diagonal before solving the equation. This method avoids the problems of divergency in the earlier stages of the refinement. A convenient value of Marquardt parameter at the beginning of refinement is 0.01; in the final stages of the refinement, the Marquardt parameter can be set to zero if the normal matrix is not singular. The equation is solved by means of the Choleski method without calculating the inverse matrix to save time.

Actually, the quantity which the refinement algorithm tries to minimize is


S = SIGMA(m) SIGMA(n) SIGMA(i) (W(m,n,i) (Y_obs(m,n,i)-Y_cal(m,n,i))^2 + Penal
where m describes the number of experiences, n is the number of diagrams for each experience and i the number of points on the diagram. The intensities of each diagram Y_calc(m,n,i) are obtained from the formula

Y_calc(m,n,i)= SIGMA(p) SIGMA(hkl) I(m,n,p,hkl) G(theta(m,n,i)-theta_(m,n,p,hkl} ) 
             + Y_bkg(m,n,i)
where I(m,n,p, hkl) represents the intensity of the hkl reflection of the p phase in the the n diagram of the m experiment, properly corrected of instrumentation geometry (by scale, Lorentz-polarization factor, multiplicity, preferred orientation ...); on the other hand, G is the function defining the global lineshape. This function takes care of the description of the peak width and may vary from one diagram to another and from phase to phase. It depends on theta, on the asymmetry corrections and, eventually, on the Miller indexes of the peak. The intensity of the peak is distributed on an interval centered on the peak and whose amplitude is at least twice the full width at half maximum (FWHM). The amplitude of this interval can be changed acting on a parameter (EpsProf): the profile lineshape is calculated until the calculated intensity of the peak is lesser than sigma(Y_min(m,n,i)).EpsProf, where sigma(Y_min(m,n,i)) is the standard deviation of the least significant point of the diagram (commonly EpsProf=0.5).

The penalty term, Penal, is a penality function which is calculated on some choosen bonds. To this purpose it is necessary to precise the bond lenght length_o for the bond b in a defined phase p at a certain Temp. The penalty algorithm xi increases the minimized sum S of a quantity proportional to the square of the difference between ideal length_o and actual length_cbond length. The exact form of the penality function is in which d_length can be seen as the standard deviation on the bond length


Penal= SIGMA(n) SIGMA(p) SIGMA(b)((length_o(m,n,p,b) - length_o(m,n,p,b))
                                  /(d_length(m,n,p,b))^2

Definitions

There are some differences in the way in which xnd manages the line profiles with respect to other programs. As the line profiles can depend on their orientation in the crystal, we will first discuss of the the way used to represent properties depending of the orientation. Then apply it to the simple case of the sample prefered orientation before going to line profiles which uses the same functions.

Orientation functions

When we have to describe properties which depend on the orientation, there are various methods. The tensor expansion can be used and can be powerfull in the case in which we use only a part of the space. But the sperical harmonics, and related functions, are probably a more efficient way, they are the functions used to describe the electron density in atoms. In high symetry crystal, it should be more convenient to use the cubic harmonics but in this case different sets of function will have to be used according the symmetry.

In xnd a very simple implemantation of the spherical harmonic is use as it is it not obvious to remind the shape of complex hybritation and to choose the rigth one to describe the crystal properties. That is why xnd only uses the simpliest polar function of each degrees, that is the p orbitals and allow to define for each function its polar axis. In the case in which we need a term which does not depend on the direction, we use the non polar s function.

The polar axis is defined with respect to the orthogonal repear (X, Y, Z) in which Z is parallel to c* and Y to b. Its orientation is characterized by the angles of the unit vector u, theta is the angle ( u, Z) and phi the angle between X and the projection of u on the XY plane.

Each function is repeared by an index which the simply related to the degrre of the associated Legendre polynomial. Their argument z is the cosine of the angle of the hkl direction with the polar axis define above.

 0 : P1 = 1
 1 : P2 = (3 z2-1)/2
 2 : P4 = (35 z4 - 30 z2 + 3)/8
 3 : P6 = (231 z6 -315 z4 + 105 z2 -5)/16
 4 : P8 = (6435 z8 -12012 z6 + 6930 z4 - 1260 z2 + 35)/128
 

When they share the same axis, all this functions are orthogonal. To construct a sharp function in a direction, you have to had they up to a degree which give you the wished sharpness.
For a given polynomial, there is only a re