UNEX is a programming environment for investigation of molecular structure. We develop new and existing experimental methods and combine them to increase accuracy and precision of results. At the current stage the full support of gas electron diffraction (GED) investigations is provided, from the calibration of instruments and data reduction to the refinement of molecular structure. Additionally, rotational constants can be used solely or in combination with GED data for determination of molecular geometry.

This manual is in active writing phase and is in no way complete. It is provided only for illustration purposes.

Cite UNEX as

Yury V. Vishnevskiy, 2019, UNEX 1.6, http://unexprog.org (access date)

UNEX is not based on any version of KCED or other programs and represents an independent research project. Nevertheless, many implemented in it methods and algorithms are based on investigations of other authors.

The aim of this manual is not to teach how to investigate molecules but only to describe UNEX commands. Please remember that incorrect settings and inappropriate usage of different methods can lead to incorrect results!


General ideas of UNEX

  • Exploration of experimental possibilities for investigation of molecular structure.

  • Development of the gas electron diffraction (GED) method and its automation.

  • Development of spectroscopic methods for molecular structure investigation.

  • Providing the ability to carry out very accurate studies due to extended facilities and flexibility of the program interface.

  • Elaboration of joint methods for molecular structure investigations.

Current possibilities

  • Investigation of molecular structure by means of GED method.

  • Refinement of geometrical parameters from rotational constants.

  • Combined refinements on the basis of GED data and rotational constants.

  • Static and 1D-dynamic models in GED.

  • Numerical and analytical parametric forms of potential function.

  • Support for geometry, amplitudes and corrections relexation.

  • Modelling of any mixtures of molecules with static and dynamic GED models.

  • Definition of molecular geometry in terms of Z-matrix.

  • Both internal geometrical parameters and Cartesian coordinates can be used as parameters and refined.

  • Support for dummy atoms.

  • Powerful methods for functional minimization.

  • Robust minimization with iteratively reweighted experimental data.

  • Automatic calculation of uncertainties for dependent parameters.

  • Methods for global minima search by grid scanning of functional values and by Monte-Carlo method (randomization). Multidimensional scanning.

  • Monte-Carlo calculation of total uncertainties for refined parameters.

  • Automatic determination of point group symmetry.

  • Automatic refinement of mean square amplitudes in groups.

  • Automatic model-dependent multiplicative or additive GED backgrounds using cubic splines or polynoms with possible usage of sector functions.

  • Automatic calculation of g-functions and atomic scattering.

  • Unlimited amount of GED data can be used in refinement.

  • Non-equal steps on intensity curves.

  • GED data reduction on the basis of TIFF images (8 or 16 bit grayscale) of diffraction patterns.

  • Automatic calibration of electron wavelengths using gas standards: benzene, CO2, CS2, CCl4.

  • Refinement of sector function from gas standard data.

  • Refinement of detector characteristic curve.

  • Calibration of scanners.

  • Computational statistical thermodynamics. Model of ideal gas, rigid rotor-harmonic oscillator, uncoupled motions.

  • Flexible and convenient input format.

  • Efficient usage of SMP (multiprocessor/milticore) systems.

  • Versions of program for Linux, Windows, macOS, OS/2.

Conditions of program usage

UNEX is distributed for free. Conditions of it’s distribution — "AS IS". The author does not guarantee any absense of errors, you use this program on your own risk.

If you found an error

If you think you have found an error or some incorrectness in UNEX the first thing to do is to check everything. Second, make sure you are using the latest version of UNEX1. If you still cannot find the source of the problem it is possible to write an e-mail to the main developer of UNEX (Yury V. Vishnevskiy, vishnevskiy@unexprog.org). It is recommended to isolate the problem and to send a smallest possible input file generating incorrect result(s). Do not forget to provide UNEX version number and your operating system type/version.

Questions and comments

If you have questions or comments you can write an e-mail to the main UNEX developer — Yury V. Vishnevskiy, vishnevskiy@unexprog.org

UNEX Usage


UNEX is a command line program. For the installation there is no need to do any special operations. Just copy it to any sutable directory. It is recommended to place the UNEX executable to a directory listed in environment variable PATH so that it can be called from anywhere. In this case it is also easier to update UNEX just by replacing the old executable with a new one only in one particular directory.


In order to use UNEX an input file should be prepared first (for details see below). Starting UNEX without any input file prints general information about UNEX usage. In simplest case the only command line parameter is the name of input file. Upon UNEX starting the input file remains unmodified and an output file with results is created. If you do not define output file name explicitly, UNEX automatically creates one named as the input file with added underline symbol, a number and an extension .log. The number indicates the version of output and it increases with each run of UNEX with the same input file. Thus, output files are never overwritten. Alternatively, you can define in command line a name of output file explicitly.

Data input

Input for UNEX are usual text files. They contain control commands and data fields. Each type of command has its own syntax and poits to program what to do. Data fields are needed for introducing any input information. For arrangement of such fileds so-called tags are used, i.e. a logically complete fragment of information is placed between two certain words which are called tags. They may contain any possible letters. The most common practice is to use simple and clear constructions like

Here goes info/data/etc...

In spide of considerable number of different commands and field types, all these elements follow one philosophy, therefore they easily can be used. The sequence of commands is important. It is not recommended to use very long strings in input files. Any string in input file can be commented out. For this in the first column you should type symbol # or ;.


In most cases UNEX input files begin with introduction of basic information. For this purpose the BASE command is used:


Here the first word BASE is the name of the command. After the = symbol goes the field format type (also named BASE here). The other two words are tags pointing to the start and end lines of the field containing basic information. Thus, UNEX will try to find the field and read the corresponding information from the input file between the following tags

Basic info goes here...

BASE field can contain control keys with their values. Depending on the job type different keys can be used. Two of them are used most often: molecules and imgfiles. The first is used when models of molecules are created and manipulated, for example in a structural analysis. The other is for definition of images, for example in GED data reduction.

Generally lines in a BASE field look like following: key name, space letter(s) and/or = character, key value. Key values can be strings, integers or floating point numbers. Usually keys accept only one value with some exceptions (for example, molecules accepts list of strings).

Sometimes it is useful to apply different settings for different stages of UNEX running. This can be achieved by calling BASE command several times, for example


MaxIter is equal here to 20


MaxIter is equal here to 30




Below is the list of keywords valid in BASE field:

  • Basic keywords


    Name(s) of molecule(s) participating in a model. In simple cases only one molecule is defined here. Sometimes several molecules must be defined. For GED this corresponds to a model of a mixture of molecules. Note, UNEX expects a special field for each molecule defined here. The opening and closing tags must correspond to the name of the molecule, for example:

        ; Special field for mol1
        mol1-related info goes here...

    Names of image files to be processed. UNEX can handle uncompressed Intel TIFF 8/16-bit grayscale files. As in the case of molecules special fields for each image are expected.

  • Keywords related to refinement of parameters


    Maximal allowed number of iterations for least-squares method in MINIMIZE. The default value is 20.


    Damping factor in least-squares method for scaling of parameter additions. There are three options:

    • damp=[number] — constant damping factor (for example, damp = 0.5)

    • damp=linear — damping factor increased linearly up to 1.0 in the last iteration.

    • damp=sigma — damping factor increased sigmoidally to the value of 1.0 in the last iteration; this is default.


    threshold values for maximal relative addition and gradient used as convergence criteria in least-squares procedure.


    threshold value for relative functional change as as convergence criterion in least-squares procedure.


    Maximal allowed number of consecutive increments of parameter Lambda in Levenberg-Marquardt method for minimization of non-linear least-squares functionals. Default value is 5.


    Turns on (=1) or off (=0, default) refinement of orthogonal linear combinations of parameters.


    Turns on (=1) or off (=0, default) refinement of scale factors for ED vibrational amplitudes. Ratios of amplitudes within each group remain constant if scales are refined (GedVarAmplScale=1), otherwise differences between amplitudes remain constant within one group.


    method for minimization of functional value in MINIMIZE command. Three options available:

    • lsq — least-squares method (LSQ).

    • goldsec — golden section method.

    • lsqgoldsec — combination of least-squares and golden section (activates automatically when LSQ fails) methods. This is default.


    Maximal allowable number of iterations in Robust-minimization of the ROBUSTM command. The default value is 10.


    Turns on (=1) or off (=0, default) printing of functional (hyper)ellipsoid at the end of MINIMIZE procedure.


    Controls whether full table of results is printed (=1, default) or not (=0) after SEARCH command.


    Turns on (=1, default) or off (=0) printing of progress status and speed of SEARCH procedure.


    Total allowed time for SEARCH=RAND command in seconds. Default value is 3600.0, i.e. one hour.


    Seed (integer number) for random number generator used in SEARCH=RAND command. Default value is 0, meaning automatic generation of seed.


    Maximal and minimal errors in numerical differentiation. By default, the maximal error is one order of magnitude less than the threshold value for derivatives (see stopping criteria for minimization). Minimal error is by default three orders of magnitude less than maximal error.


    Factor for printed standard deviations of parameters. By default it is 1.0.


    Factor for the regularization term in least-squares functional. Default value is 1.0.


    Factor for the term with rotational constatnts in least-squares functional. Default value is 1.0.


    Turns on (=1, default) or off (=0) usage of covariations matrix in calculation of standard deviations for dependent parameters.


    Turns on (=1) or off (=0, default) using absolute weights in least-squares method for calculation of standard deviations of refined parameters. The weights are calculated from standard deviations of experimental data as stem 782177c56e139dd60d23117dba352991.


    Turns on (=1) or off (=0, default) calculations of contributions of different parts of least-squares functional into refined parameters as described in [1]. This is done in the end of MINIMIZE procedure.

  • Monte-Carlo simulations


    Maximal allowed number of iterations in Monte-Carlo procedure MCMIN. The default value is 100000.


    Default standard deviation for sM(s) data used in Monte-Carlo procedure MCMIN.


    Turns on (=1) or off (=0, default) simularion of experimental data on the basis of model by adding some random noise.


    Turns on (=1) or off (=0, default) randomization of data used for refinement of model.


    Turns on (=1) or off (=0, default) randomization of parameters of model.


    Seeds for random number generators used for data and parameters, respectively. By default they are initialized to random values based on current time and process ID. If you want deterministic results you have to define seeds with these keywords.


    Print (=1) or not (=0, default) randomized values of parameters to output file.


    Calculate (=1) or not (=0, default) rotational constants during simulation.


    Number of steps to be done for printing intermediate results of simulation and testing for convergence. Default is 1000. Zero means no printing of intermediate results and no testing for convergence.


    A keyword to allow (=1, default) or not (=0) using additional precalculated results of Monte-Carlo simulations read in with the MCREAD command.


    Group number for RegAlpha parameter in Monte-Carlo simulations.


    Maximal and minimal allowed values for RegAlpha parameter in randomization.


    Group number for RotConstAlpha parameter in Monte-Carlo simulations.


    Maximal and minimal allowed values for RotConstAlpha parameter in randomization.


    Turn on (=1, default) or off (=0) assignment of determined in the simulation standard deviations to respective refined parameters.


    Turn on (=1, default) or off (=0) application of determined in the simulation biases to respective refined parameters.


    Percentages of extensions applied to ranges of amplitude and correlation values printed by PRINT=AMPLMCTMPL and PRINT=CORRMCTMPL, respectively. Default values are 30.0.


    Threshold value for convergence criteria in MCMIN. Sampling of parameter is considered as converged if relative changes in its mean value and standard deviation are below MCConvThr. Default value is 0.001, which corresponds to 0.1%.

  • ED intensity


    Type of static model for calculation of sM(s) function. Available options are

    • 0 — standard approximation (default):

sM(s) = \sum_{i>j} g_{(ij)} \times e^{-\frac{s^2l_{(ij)}^2}{2}} \times \frac {sin \left( sr_{a,(ij)} - \a_{(ij)} \frac {s^3l_{(ij)}^4}{6} \right) }{r_{a,(ij)}}

      Here ij is the pair of atoms i and j, g — g-function, l — mean amplitude of interatomic vibrations, ra — thermal-average interatomic distance, a — asymmetry constant. Summation is performed for all pairs of atoms.

    • 1 — Cumulant-3 approximation:

sM(s) = \sum_{i>j} g_{(ij)} \times e^{-\frac{s^2l_{(ij)}^2}{2}} \times \frac {sin \left( sr_{a,(ij)} - \c_{3,(ij)} \frac {s^3}{6} \right) }{r_{a,(ij)}}

      Symbols have the same meaning as above, except that the definition of the asymmetry (phase-shift) constant is here different. This approximation is recommended to use if you read in vibrational asymmetry constants in format produced by ElDiff program.


    Default minimal and maximal s-values (in Å) for calculation of g-functions.


    Default step size for s-values (in Å) in calculation of g-functions.


    Type of approximating function for background lines. Available options are

    • spline — cubic spline, this is default

    • polynom — simple polynomial

    • chebpolynom — orthogonal Chebyshev polynomial


    Power of polynom function used for refinement of responce curve of detector with the RESPCALIB procedure. Default value is 10.


    Version of database with atomic scattering factors. Old values are used when SFactorsDBVer=1. By default SFactorsDBVer=2, this corresponds to factors published in [2].


    Turn on (=1) or off (=0, default) smoothing of reduced (divided by sector function and atomic scattering) multiplicative background in MBGL command.


    Maximal number of iterations (0 by default) in refinement of scale factor for sM(s) in MBGL command. For the A1BGL and A2BGL procedures this keyword just turns on (any positive value) or off (=0) the refinement of t-factor for total intensity.


    Relative change (0.001 by default) in scale factor as convergence criterion for procedure of refinement of sM(s) scale factors in MBGL command or t-factors of total intensity in the A1BGL and A2BGL commands.


    Minimal allowed difference between s-values. Default value is 1e-7 Å-1.

  • ED Sector


    Type of model for sector function and regularization sector function, respectively. Possible values are rpn, sinpn and const. For explanation see below section related to introduction of sector functions. Default is rpn.


    Parameter A in the model for (regularization) sector function. Default value is 2π.


    Parameter n in the model for (regularization) sector function. Default value is 3.0.


    Parameter rmax (in mm) in the model for (regularization) sector function. Default value is 100.0.

  • ED Standards


    Default type of standard if it is not indicated explicitly in the input of ED intensities. Possible values are CCl4, C6H6, CO2 and CS2. Default is CCl4.


    Maximal number of iterations in least-squares refinement of parameters from ED gas standard data. The default value is 100.


    Factor for regularization of refined sector function. By default it is 0.0, which indicates the absence of regularization.


    Factor for regularization of refined background functions. Default value is 0.0.


    Regularizing value for background. Default value is 0.0.


    Keys turning on (=1) or off (=0), refinement of electron wavelength, sector function, scale factors and additive background, respectively. By default, everything is on, except for StdVarLambda.


    Enables (=1) or disables (=0, default) printing correlations between refined parameters in STANDARD procedure.


    Prefactor for least-squares term calculated as sum of squares of second derivatives of background lines. By default this factor is zero meaning that this term is not included.


    Default number of inflection points (or polynom power) for background lines in processing ED standard intensities. The default value of this number is 3.


    Number of iterations in scanning of electron wavelength in STANDARD. By default it is zero, i.e. scanning is not performed.


    Minimal (default value is 0.039 Å) and maximal (default value is 0.120 Å) values of electron wavelength in scanning.


    Maximal number of iterations in refinement of electron wavelength. Default number is 50.


    Convergence tolerance in relative change of refined lambda. Default value is 1.0e-4.


    Step size in mm for automatically initialized reduced sector function in LSQ refinement in STANDARD. Default value is 1.0 mm.


    Minimal and maximal allowed r-values of the autogenerated reduced sector function for refinement in STANDARD. Default values of these keywords are negative, which means that the corresponding parameters should be determined automatically.


    Initialize additive background using A1BGL procedure before LSQ refinement in STANDARD. Turned on (=1) by default.


    Maximal number of iterations for refinement of scale- or t-factors in background procedures used from STANDARD. Default number is 30.


    Correct refined in STANDARD=LSQ background if it gets negative. By default this is turned off (=0).

  • ED Radial distribution functions


    Method for calculation of radial distribution curves. There are three options: old, classic (this is default) and modern. For details see description of the RDF command.


    The key determines whether the Fourier curve is multiplied (=1, default) or not (=0) by r. Multiplication by r produces a better approximation to P(r) function, but also increases difference curves.


    Maximal value of r (in Å), for which radial distribution curves are calculated. By default FurRto is determined automatically depending on the maximal interatomic distance in the model.


    Step size along r-scale for calculation of radial distribution functions. Default value is 0.01 Å.


    Allowed distance between points along the radial distribution function. Default value is 0.02 Å.


    Turns on (=1) or off (=0, default) the usage of an adaptive method for choosing points on the r-scale for calculation of radial distribution functions.


    Coefficient in an exponential function used for multiplying sM(s) curves before Fourier transformation. By default it is calculated according to stem 509cecc3a4abb9cdf9974575cb784b69, where smax is the maximal argument of the transformed sM(s) function.


    This key enables (=1, default) or disables (=0) the division of sM(s) curves by a g-function (by default corresponding to a term with maximum contribution) before Fourier transformation.


    Types of atoms (for example =C,O), for which the corresponding g-function must be calculated and used for modification of sM(s) before Fourier transformation if FurDivGf=1. By default this is initialized automatically so that the pair of atoms available in molecule(s) of the model have highest atomic numbers.


    Influences results of the PRINT=GRAPHTERMS command. This parameter defines maximal allowed difference betweem distances of degenerate terms in calculation of their contributions. By default this key is negative, which turns off the searching for degenerate terms.


    Influences results of the PRINT=GRAPHTERMS command. Turns on (=1, default) or off (=0) division of calculated term contributions on the respective amplitudes.


    Method of numerical integration: trapezoidal (default, fast) or romberg (slow but potentially a bit more accurate).


    Turns on (=1) or off (=0, default) calculation of standard deviations for experimental radial distribution functions.

  • ED Data reduction


    Maximal number of iterations in the least-squares procedure of the IMAGE=INTSCAN command. The default value is 50.


    Turn on (=1) or off (=0) the creation of image files representing refined asymmetric additive background, intensity curve and weights of original data points. By default only images of intensity curves are created.


    Refined in data reduction intensity curves are printed with corresponding r-values (=1) or s-values (=0, default).


    Print optical density (=1) or relative electron scattering intensity (=0, default) in the end of the IMAGE=INTSCAN command.


    Determines whether correlations between refined intensity values should be printed (=1) or not (=0, default).


    Determines whether correlations between all refined in data reduction parameters should be printed (=1) or not (=0, default).


    Determines whether histogram of image data used in IMAGE=INTSCAN should be printed (=1) or not (=0, default).


    The parameter in the method of Tukeys bisquares weights used for rejection of image data points in the IMAGE=INTSCAN command. The default value is 4.685.

  • Other


    Any string, describing the input for UNEX. This is optional.


    Factor for calculation of threshold value for minimal singular number in SVD decomposition procedure. The threshold value determined as product of this factor and maximal singular number. Singular numbers less than the threshold value are discarded. Default value is 103 times machine double precision, which usually corresponds to stem 8252d5b84b689739700cbe939b1d8b24.


    Depending on the setting of this parameter shapes and locations of areas in optical wedges are refined (MoveWedArea=1, default) or remain fixed (=0) in the WEDGE=AUTO and WEDGE=MANUAL commands.


    Units for geometrical angles on input/output. Possible values are degree (default) and radian.


    Potential energy units on input. Possible values are

    • au — atomic units

    • kcal — kcal/mol

    • kJ — kJ/mol, default


    Input units for rotational constants. Possible values are

    • cm — cm-1

    • Mhz — Megahertz, default


    Temperature in Kelvins. This parameter affects calculations related to GED with dynamic models and calculations of thermodynamic functions with CALCTHERMO command. The default value is 298.15 K.


    Pressure in standard atmospheres (atm). It is used in calculations of thermodynamic functions. The default value is 0.986923267 atm.


    Width and height (expressed as number of characters) of pseudographics produced by the PLOT command.


    Number of threads used for parallel calculations in UNEX whenever possible. By default UNEX uses all available in system processors/cores.


    Cartesian coordinates of molecules are printed in system of principal axes of inertia (PrintMainInertXYZ=1, default) or in input/Z-matrix orientation (=0).


    Definition of the system of principal axes of inertia. Possible values are ​​xyz, xzy, yxz, yzx, zxy, zyx (the last one is default).


    Sensitivity factor for determination of symmetry elements in molecules. The default value is 1.0. The less this factor is, the more accurate must be molecular geometry.


    Defines whether symmetrically unique atoms should be printed (=1) or not (=0, default) by PRINT=SYMMETRY command.


    Defines whether standard deviations of Z-matrix parameters should be printed (=1) or not (=0, default) by PRINT=SYMMETRY command.


    Turns on (=1) or off (=0, default) an alternative method for calculating edge points of smoothing splines.


    Number of columns for cubic force constants printed by PRINT=F3CBLOCKS command. Default value is 5.


    Parameter to control detection of bonds between atoms. If distance between atoms is less than sum of their covalent radii plus GeomBondTol*100% then a bond is recognized. The default value is 0.15.


For each molecule declared in BASE a special field must be defined, which contains some general information about the molecule. The starting and ending tags of this field must be constructed as <name_of_molecule> and </name_of_molecule>, respectively. For example, for a molecule mymol the corresponding field is

mymol-specific info goes here...

Possible keywords in field of molecule:


Empirical formula of the molecule, for example formula=C6H12O6. This is a mandatory keyword.


Mole fraction of the respective molecule in a mixture, if several molecules are defined in BASE. The value must be in range 0.0-1.0. For the last listed in BASE molecule this keyword makes no sence because the corresponding mole fraction is calculated automatically.


Group number for mole fraction. In order to refine the mole fraction a positive integer group number must be defined using this keyword. Note, this must be unique number, since mole fractions cannot be refined in groups with other parameters.


If the molecule is a pseudo-conformer in a GED dynamic model, this keyword means its degeneracy. By default it is equal to 1.


GED model for the molecule. Possible values are static (default) and dynamic. In case of dynamic model, pseudo-conformers must be defined using psconfs keyword.


List of pseudo-conformers in the dynamic model of the molecule. Syntax is the same is for molecules in BASE field.


Total number of pseudo-conformers in the dynamic model of the molecule. By default this equals to the number of pseudo-conformers defined using psconfs keyword. However, additional pseudo-conformers can be automatically generated and populated if pcnum has larger value.


Default degeneracy for all pseudo-conformers.


Type of potential function used in the dynamic model of the molecule. Possible options are

  • Fur1 — parametric function stem d5a1959b8201dce3836001ec252571e6.

  • Fur2 — parametric function stem e4da42688433e7e3c60aeeb5612334ca.

  • Spline — cubic spline, this is default.

  • Gauss — parametric function, sum of gaussians stem dc719d273347a57fb28a103fdb524a44.


Number of parameters in potential function. Makes no sense in case of splines.


Number of coefficients in relaxational polynomials used for generation of additional pseudo-conformers. Default value is 5, which corresponds to polynomials of power 4.


Spin multiplicity of the molecule. The default value is 1.


List of isotopologues related to the molecule. This keyword is similar to molecules in BASE. Each isotopologue must have its own field just like normal molecules. The isotopmols is generally used for refinement of molecular structure from rotational constants of parent molecule and its isotopologues.


Experimental rotational constants of the molecule.


Standard deviations of the corresponding experimental rotational constants.


Corrections to rotational constants. Usually Be-B0.


Standard deviations of the corresponding experimental rotational constants for the Monte-Carlo method.


Group number for mole fraction in Monte-Carlo simulations.


Minimal and maximal allowed values for mole fraction in Monte-Carlo simulations.


Turn on (=1) or off (=0, default) writing of molecular Cartesian coordinates on each step of Monte-Carlo simulations to a special file. The file is created in current directory with a name consisting of the name of molecule, data seed and xyz extension.


Images are defined in UNEX similar to molecules — i.e. image file names are listed using imgfiles keyword in BASE. Accordingly, for each image file can be defined a field with starting and ending tags constructed from the name of this file. For example


; Special field for img1
img1-related info goes here...

Valid keywords in image fields are:


Resolution of image along X- and Y- directions, corresponding to width and height of the image. These keywords are not obligatory since TIFF files contain this information and UNEX can read it. However, the nominal resolution values may not represent real resolution, for example due to imperfections in scanning device. In such cases true resolution can be defined explicitly with these keywords.


Coordinates of the center of diffraction pattern in pixels. In GED data reduction procedure these values can be further refined.


Coordinates of the center of rotating sector device in pixels. Similar to Xc and Yc these values play role in GED data reduction and can be refined. By default they are equal to Xc and Yc, respectively.


Optical density corresponding to zero level of measured electron diffraction intensity. By default, 0.02.


Distance (in mm) from nozzle to detector in GED experiment.


Distance (in mm) from sector to detector in GED experiment.


Turns on ('=1') or off (=0, default) usage of sector function in data reduction of this image.


Smallest and largest distances (in mm) to the center of diffraction pattern. The diffraction pattern within this range will be used in data reduction procedure.


Step size for intensity curves refined from diffraction pattern in data reduction. The units for this keyword depend on the IntStepType keyword. If IntStepType=sconst step size is in reverse Angstroms, if IntStepType=rconst the step size is in mm.


Type of step increments for intensity curve in data reduction:

  • sconst — constant step size in s, this is default.

  • rconst — constant step size in r.


Electron wavelength (in Angstroms) for the diffraction pattern used in data reduction.


Minimal and maximal level values. Only pixels with levels within this range are processed. By default these keywords correspond to the full range of possible levels.


This group of keywords is for control of data reduction. They turn on (=1) or off (=0) the refinement of the center of diffraction pattern, center of rotating sector device and asymmetric background, respectively. By default all types of parameters refined. Note, if IntVarCentre=0 then the center of sector is also fixed!


Number of bits per pixel. Normally this is determined automatically. If not, this can be defined here. Allowed values are 8 or 16.


Number of anchor points for additive asymmetric background along the X and Y axes.


Maximal allowed value of additive background in percent of average signal value on the diffraction pattern. The default value is 10.0.

Molecular geometry


In UNEX geometrical structure of molecules can be defined by means of Z-matrices. For this purpose ZMATRIX command is used


Here mol is the name of molecule, FREEZM is the format and the rest are the tags of the respective field in input file. The FREEZM format is rather flexible so that Z-matrices from many other programs can be transferred without problems. Positions of atoms can be defined by independent internal geometrical parameters (bond lengths, angles and torsional angles), Cartesian coordinates or combination of both. Usually a Z-matrix consists of two sections, body of Z-matrix and a list of its parameters. Elements in each line of Z-matrix can be separated by spaces, commas and/or tabulation characters. Same variable(s) can be used multiple times within one Z-matrix. In the most general case, definition of an atom in body of Z-matrix is as follows:

number of atom, symbol of atom, atomic mass, 1st reference atom, 1st parameter, 2nd reference atom, 2nd parameter, 3rd reference atom, 3rd parameter, type of definition

All items must be in one line. Number of atom, atomic mass and type of definition are optional. First three atoms require less reference atoms (see examples). Parameters can be explicitly defined as floating point numbers (in this case they cannot be refined) or as names of variables. The list of variables goes after the main body of Z-matrix. In the very end of the line the type of definition can be defined as an integer. Possible types are

  • 0, default type, three internal parameters are used for the definition of atom position: bond length, angle and torsional (dihedral) angle.

  • 1 or -1, expected parameters are bond length, and two angles. There are two equvivalent mirror-symmetric positions of atom corresponding to this set of internal parameters, therefore this type can be positive (+1) and negative (-1). The sign of the type corresponds to the sign of the torsional angle constructed on the defined atom and 1st, 2nd and 3rd reference atoms.

  • 2 or -2, similar to the type above, internal parameters are bond length, 2nd bond length and an angle.

  • 3 or -3, similar to the types above, internal parameters are three bond length to three reference atoms, respectively.

  • 4, expected internal parameters are bond length, 2nd bond length and a torsional angle.

In case of using Cartesian coordinates, positions of atoms are defined as

Number of atom, symbol of atom, atomic mass, first parameter, second parameter, third parameter

Here the parameters are Cartesian coordinates of the atom. As in the case of bond lengths, angles and torsional angles, explicit values of Cartesian coordinates or names of variables can be defined here. If variables are used, a minus sign - can be prepended to a variable, indicating that in calculations of the atom position negated value of the corresponding parameter must be used. Note, it is impossible to use both Cartesian coordinates and internal geometrical parameters for definition of the same atom. However, within the same Z-matrix different atoms can be defined using both internal parameters and Cartesian coordinates.

The second part of Z-matrix is the list of variables, their values and, optionally, group numbers. Values of bond lengths cannot be negative or equal to zero. Values for angles must be between 0 to 180 degrees. Extreme values (0 or 180) are possible only in some special cases. Torsional angles can have any values.

Group number of a parameter is an integer value indicating the group, in which the parameter can be refined. Differences between values of parameters within one group are fixed during refinement. It is impossible to combine in same group

  • bond lengths and (torsional) angles,

  • Cartesian coordinates and bond lengths,

  • Cartesian coordinates and (torsional) angles.

In GED dynamic models, non-rigid coordinates (for example, torsional angles) must be labeled by negative group numbers. This is special case, not an indication of refinable parameter. In dynamic models there is no need to specify groups in Z-matrices for each pseudo-conformer; it is enough to specify group numbers only for parameters of the first pseudo-conformer.

Examples of Z-matrices:

  1. Simplest example

    Figure 1. Molecular structure of H2O2.
    O  1  0.960
    O  2  1.480  1  120.0
    H  3  0.960  2  120.0  1  120.0

    This is a simplest example. First three atoms are defined in a special way, the fourth one is defined in a general way. To specify the first atom no parameters are required, position of the second atom is determined by the H—​O bond length, position of the third atom is determined by the O—​O bond length and the H—​O—​O angle. The fourth atom is determined by a triple of parameters: a bond length, an angle and a torsional angle. The values of all parameters are given explicitly in the Z-matrix body. However, in many cases it is more convenient to define variables in a second part of Z-matrix and use them in the first part:

    O  1  Roh
    O  2  Roo  1  Aooh
    H  3  Roh  2  Aooh  1  Fhh
    Roh=0.960     1
    Roo=1.480     1
    Aooh=120.0    2
    Fhh=120.0     3

    In this example it is also demonstrated how group numbers are assigned to parameters. Here two bond lengths Roh and Roo are in group 1, the angle Aooh is in group 2 and the torsion angle Fhh is in group 3. The parameters with assigned group numbers can be processed and refined, for example in MINIMIZE procedure.

  2. Alternative way for definition of third atom

    Figure 2. Molecular structure of H2O.

    Usually (see first example) position of third atom is determined by a distance to second atom and by an angle to the first atom. Here is an example of an alternative way for definition of the third atom, where a distance to the first atom and an angle of 3—​1—​2 atoms are used:

    O  1  Roh
    H  1  Rhh  2  Ahho
  3. Definition of third atom by means of two distances

    Figure 3. Molecular structure of cyclopropane.
    C  1  Rcc
    C  1  Rcc  2  Rcc     3

    Only distances can be used to define position of atoms. For a third atom only two distances are required. Here to define position of the third carbon distances to the first and to the second carbons are used and a special integer key 3 is given in the very end of the corresponding line.

  4. Definition of atoms with distance and two angles

    Figure 4. Molecular structure of carbon tetrachloride.
    C    1  R1
    Cl   2  R1      1  A1
    Cl   2  R1      1  A1      3  A1      -1
    Cl   2  R1      1  A1      3  A1       1
         R1          1.7724
         A1        109.47122063

    Here is an example of carbon tetrachloride defined with Td symmetry. The last two chlorine atoms are defined using bond lengths and angles, represented as R1 and A1 variables. This type of definition is indicated with 1 or -1 keywords in the very end of the corresponding lines. The sign of this keyword always corresponds to the sign of the respective tosion angle X—​A—​B—​C, where X is the defined atom and A, B and C are the first, second and third anchor atoms, respectively. In this example positions of the last two atoms are determined by exactly the same parameters but with two different by sign keys 1 and -1.

  5. Definition of atoms using two distances and one angle

    Figure 5. Fragment of a molecule with 5-membered ring.
    C 1 Rcc
    O 2 Rco  1 Acco
    C 3 Rco  2 Acoc 1 F1
    N 1 Rcn  4 Rcn  3 Anco   2
     Rcc     1.51
     Rco     1.53
     Rcn     1.40
     Acco  106.0
     Acoc  108.0
     Anco   90.0
     F1      0.0

    In this example the 5-th atom is defined using two distnaces C1—​N5 and C4—​N5 (both equal to Rcn) and an angle O3—​C4—​N5 (parameter Anco). This type of definition is indicated by the integer key 2 in the very end of the line. Sign of this parameter corresponds to the sign of the torsional angle N5—​C1—​C4—​O3. In this case the configuration with parameter -2 would be symmetrically equivalent to the presented structure.

  6. Definition of atoms using two distances and a torsional angle

    Figure 6. Fragment of another molecule with 5-membered ring.
    C 1 Rcc
    C 2 Rcc2 1 Accc
    C 3 Rcc  2 Accc 1 F1
    N 1 Rcn  4 Rcn  3 F2  4
     Rcc   1.5152
     Rcc2  1.53
     Rcn   1.40
     Accc  106.0
     F1    0.0
     F2    90.0

    This is an example of geometry definition of a five-membered ring in envelope conformation with symmetry Cs. Here the 5-th atom is defined using two distnaces C1—​N5 and C4—​N5 (both equal to Rcn) and a dihedral angle C3—​C4—​C1—​N5 (parameter F2). This is indicated by the key 4 in the very end of the respective line. There is no -4 type since the geometrical configuration is already defined by the sign of the dihedral angle.

  7. Definition of atoms using three distances

    Figure 7. Tetrahedral structure of P4 molecule.
    P 1 Rpp
    P 1 Rpp  2 Rpp           3
    P 1 Rpp  2 Rpp  3 Rpp   -3
     Rpp     1.60

    This is an example of a Z-matrix for the tetrahedral P4 molecule with only one independent geometrical parameter within Td point group. The third atom is defined as in example 3. The fourth atom is defined using three distances and a key -3. The sign of the key defines geometrical configuration and corresponds to the sign of the dihedral angle P3—​P2—​P1—​P4.

  8. Using Cartesian coordinates

    Figure 8. Structure of cubane carbon skeleton.
    C   xx   yy   zz
    C  -xx   yy   zz
    C   xx  -yy   zz
    C   xx   yy  -zz
    C  -xx  -yy   zz
    C  -xx   yy  -zz
    C   xx  -yy  -zz
    C  -xx  -yy  -zz
     xx = 0.8
     yy = 0.8
     zz = 0.8

    In UNEX it is possible to define molecular geometry using Cartesian coordinates within Z-matrix. In this example a cubane carbon skeleton is defined using only Cartesian coordinates. Here formally three independent parameters are used: xx, yy and zz. However, for the octahedral symmetry they are all equal and can be reduced to just one parameter. Note also the usage of minus signs before variables in some places.

  9. Mixing Cartesian coordinates and internal parameters

    Figure 9. Molecular structure of cubane.
    C   xx   yy   zz
    C  -xx   yy   zz
    C   xx  -yy   zz
    C   xx   yy  -zz
    C  -xx  -yy   zz
    C  -xx   yy  -zz
    C   xx  -yy  -zz
    C  -xx  -yy  -zz
    H 2 Rch 3 Rch 4 Rch  -3
    H 1 Rch 6 Rch 7 Rch   3
    H 3 Rch 4 Rch 8 Rch   3
    H 1 Rch 5 Rch 7 Rch  -3
    H 2 Rch 4 Rch 8 Rch  -3
    H 5 Rch 6 Rch 7 Rch  -3
    H 2 Rch 3 Rch 8 Rch   3
    H 1 Rch 5 Rch 6 Rch   3
     xx = 0.8
     yy = 0.8
     zz = 0.8
     Rch = 2.4

    In UNEX it is also possible to define molecular geometry using Cartesian and internal coordinates together. The cubane skeleton from the previous example is supplemented here with hydrogen atoms using the ±3 type of definition (three distances). This is only for illustration purposes. In real practice for this molecule in the case of octahedral symmetry it would be more simple to use Cartesian coordinates for definition of hydrogens just like for carbons.

  10. Dummy atoms

    Figure 10. Molecular structure of NH3 with a dummy atom.
    N 1 1.0
    H 2 Rnh  1  Ahnx
    H 2 Rnh  1  Ahnx  3   Dx
    H 2 Rnh  1  Ahnx  3  -Dx

    Dummy atoms can be utilized for definition of molecular structure. The X symbol must be used for them. Also note the possibility to apply negative sign to the dihedral angle Dx.

  11. Explicit numeration of atoms

    If default numbering is not acceptable atom numbers can be given explicitly in Z-matrix:

    5 X
    1 N 5 1.0
    2 H 1 Rnh  5  Ahnx
    3 H 1 Rnh  5  Ahnx  2   Dx
    4 H 1 Rnh  5  Ahnx  2  -Dx

    Here the first defined dummy atom is in fact the 5-th in the list of atoms.

  12. Definition of atom masses

    By default UNEX uses masses of the most stable isotopes of atoms. However, masses of individual atoms can be defined right in Z-matrix, like in the example for D2O below

    H 2.0141
    O         1 Roh
    H 2.0141  2 Roh 1 Ahoh
  13. Definition of standard deviations

    In UNEX there is a possibility to define values of Z-matrix parameters together with their respective standard deviations. This can be useful if you want to calculate propagation of the defined specific errors to some other dependent geometrical parameters. In the example below the distance Rnh has the value 1.1 and standard deviation 0.001, the angle Ahnx is defined to be 110.0 degrees with standard deviation 0.2, while the parameter Dx is defined with a standard deviation equal to 0.0. For the latter it is also possible just to omit the value 0.0. Note, for calculation of errors for other dependent geometrical parameters it is necessary to assign group numbers to parameters in Z-matrix, otherwise they will not participate in calculation even if their standard deviations are not zero.

    N 1 1.0
    H 2 Rnh  1  Ahnx
    H 2 Rnh  1  Ahnx  3   Dx
    H 2 Rnh  1  Ahnx  3  -Dx
    Rnh=1.1      0.001     1
    Ahnx=110.0   0.2       2
    Dx=120.0     0.0
Cartesian coordinates

In some cases to perform required computations it is sufficient to define molecular structure only in form of Cartesian coordinates. For this purpose the MOLXYZ command can be used:


Here mol is the name of molecule, format must be either XYZUNEX or XYZGAUSSIAN, otag and ctag are opening and closing tags of the corresponding data field to be read.

XYZUNEX is a flexible format. In the most complete form each line defines atom number, atom symbol, mass (in amu) and Cartesian coordinates:

1 O  16.0     0.000000    0.000000    0.115719
2 H   1.0     0.000000    0.748790   -0.462876
3 H   1.0     0.000000   -0.748790   -0.462876

Numeration must not be sequentially ordered. The following is also possible:

3 H   1.0     0.000000   -0.748790   -0.462876
1 O  16.0     0.000000    0.000000    0.115719
2 H   1.0     0.000000    0.748790   -0.462876

In the simplest form, numeration and masses can be omitted. In this case sequentially ordered numeration and default masses are assumed. Default units for Cartesian coordinates are Angstroms. With Units keyword also Bohrs can be used:

O           0.00000000     0.00000000     0.12236619
H           0.00000000     1.41500832    -0.97102012
H           0.00000000    -1.41500832    -0.97102012

The other possible format is XYZGAUSSIAN. In can be used for data printed by Gaussian [3] program, for example

      1          1           0        0.000000    0.000000    1.539305
      2          6           0        0.000000    0.000000    0.458150
      3         17           0        0.000000    1.678636   -0.084082
      4         17           0        1.453741   -0.839318   -0.084082
      5         17           0       -1.453741   -0.839318   -0.084082

Note, Gaussian can print Cartesian coordinates with or without atomic types (zeros in the example above). Both cases are recognized by UNEX automatically, so the following data can be read using exactly the same command:

      1          1                    0.000000    0.000000    1.539305
      2          6                    0.000000    0.000000    0.458150
      3         17                    0.000000    1.678636   -0.084082
      4         17                    1.453741   -0.839318   -0.084082
      5         17                   -1.453741   -0.839318   -0.084082

Upon reading of data atoms can be automatically renumbered using RENUM command. RENUM command must be given inside the data field:

 C  12.0               -1.03693735   -0.02315941    0.76526551
 C  12.0                0.02512688   -1.12502827    0.77820594
 C  12.0                0.02512688   -1.12502827   -0.77820594

Here the renumbering works as C1→C2, C2→C3 and C3→C1.

MOLXYZ command can be executed when structure for a given molecule is already defined with a Z-matrix. In this case parameters of the Z-matrix are recalculated using readed Cartesian coordinates. However, Z-matrices can imply geometrical restrictions like symmetry, equality of parameters, etc. In such a case a Z-matrix might be incompatible with introduced Cartesian coordinates and the updated parameters of the Z-matrix cannot fully reproduce the input geometrical structure.

Potential functions

In order to construct a dynamic model for molecular part of electron diffraction intensity a potential function must be introduced. This can be using POTENTIAL command:


here mol is the name of molecule, format can be PTL1 or FUNC, otag and ctag are opening and closing tags of data field as usually.

The PTL1 format is for the case when a potential function is introduced in numeric form, for example


  0.0  52.759317
 10.0  52.265898
 20.0  50.701285
 30.0  47.791786
 40.0  43.252047
 50.0  37.535062
 60.0  31.751394
 70.0  23.594173
 80.0  13.194505
 90.0   5.294997
100.0   1.090070
110.0   0.000000

Here in the first column are values of geometric parameter corresponding to dynamic coordinate and respective energy values in the second column. Their units are controlled by the AngleUnits and PotEUnits keywords in BASE. After reading of the data UNEX approximates this data with a function. The type of the function depends on the PotType value in the data field of the respective molecule. If it is a parametric function then the PotCoefNum keyword should be set to a proper value.

Data field in PTL1 format may contain two special keywords: POTCOEFV and POTCOEFG. The first one is for setting initial values for parameters of model potential function. They are used in approximation procedure. Generally, for cosine series they are not required but for a sum of Gaussians it is very advisable to set them to some reasonable values, which will be refined further by UNEX. The other keyword, POTCOEFG, is for setting group numbers for those parameters, which should be refined in MINIMIZE and related commands. The example below demonstrates both keywords

        0.0    -2104.2041440921
      -10.0    -2104.2043320255
      -20.0    -2104.2049279551
      -30.0    -2104.2060361246
      -40.0    -2104.2077652201
      -50.0    -2104.2099427046
      -60.0    -2104.2121455875
      -70.0    -2104.2152525088
      -80.0    -2104.2192135333
      -90.0    -2104.2222222971
     -100.0    -2104.2238238691
     -110.0    -2104.2242390548
     -120.0    -2104.2240176886
     -130.0    -2104.2236761259
     -140.0    -2104.2234703951
     -150.0    -2104.2234587732
     -160.0    -2104.2235955815
     -170.0    -2104.2237665581
     -180.0    -2104.2238429817

Note, this data require the following settings:

  • PotEUnits=au in BASE field since energies are given in atomic units,

  • PotType=Gauss in molecular data field as this potential is best described with a sum of two Gaussians,

  • PotCoefNum=6 in molecular data field since two Gaussians require six parameters in total.

The POTCOEFG keyword in this example sets group numbers 31—​37 for each of the six parameters. The POTCOEFV sets initial values for parameters, 53.0 for V1, -0.3 for Δ1, 1.0 for w1, 2.0 for V2, -2.8 for Δ2 and 1.0 for w2 (definition of parameters see in the description of the PotType keyword). Note, in both keywords numeration of parameters starts from 1. With a PRINT=POTENTIAL,mol command you can check current values of potential function parameters and their group numbers.

The other available format FUNC is for the case of introducing particular values of parameters for a potential function. In the example below


1 0.0
2 1.5    101
3 0.2    102
4 0.001
5 0.04   103

introduction of values for first five parameters is done. Additionally, group numbers 101, 102 and 103 are assigned to parameters 2, 3 and 5, respectively. As in the examples above the keys PotEUnits, PotType and PotCoefNum here also should be set before reading parameter values. Note, it is possible to execute several POTENTIAL commands with FUNC format and to introduce values only for selected parameters. In this case the other parameters will not be affected.

ED terms

A term in GED is a pair of atoms with associated with it parameters like distance, vibrational amplitude, correction and asymmetry (phase-shift) constant. Vibrational amplitudes, corrections and asymmetry constants required for calculation of ED molecular intensities can be introduced with AMPLITUDES command. The syntax of the command is as usual:


where format can be either FREEU, SHRINKU or ELDIFF.

An example of data field in FREEU format:

;a1  a2     comment       l        corr         a       g
O1   H2     0.9591      0.0675   -0.0126     2.0000     1
O1   H3     0.9591      0.0675   -0.0126     2.0000     1
H2   H3     1.5063      0.1125   -0.0129     1.0000     2

Each line includes: a pair of atoms, arbitrary comment (here distance between atoms), amplitude, vibrational correction, asymmetry constant, group number.

If you do not need to assign group numbers (no need to refine amplitudes), they may be omitted

;a1  a2     comment       l        corr         a       g
O1   H2     0.9591      0.0675   -0.0126     2.0000
O1   H3     0.9591      0.0675   -0.0126     2.0000
H2   H3     1.5063      0.1125   -0.0129     1.0000

If asymmetry parameters are zero, they also can be omitted. Note, group numbers may be defined

;a1  a2     comment       l        corr         a       g
O1   H2     0.9591      0.0675   -0.0126                1
O1   H3     0.9591      0.0675   -0.0126                1
H2   H3     1.5063      0.1125   -0.0129

If a correction is zero and an asymmetry parameter is also zero, then both numbers may be omitted. But if a correction is zero and the corresponding asymmetry parameter is not zero, then both numbers must be defined explicitly

;a1  a2     comment       l        corr         a       g
O1   H2     0.9591      0.0675
O1   H3     0.9591      0.0675                          1
H2   H3     1.5063      0.1125    0.0000     1.0000

Another option is to use the SHRINKU format. It is implemented for reading data produced by Shrink [4] program. Specifically UNEX expects data as it is printed by Shrink in tables for second approximation:

;Amplitudes and corrections at 0010 K, second (harmonic)
;approximation, local centrifugal distortions included;
;<dr()> are deviations from equilibrium distances
;   Atoms   Distance  Amplitude <dr(loc)> <dr(har)>      K
1  O1   H2   0.9591     0.0675    0.0011    0.0000    0.00365    1
2  O1   H3   0.9591     0.0675    0.0011    0.0000    0.00365    2
3  H2   H3   1.5063     0.1125    0.0001   -0.0038    0.01201    3

From the given data UNEX reads amplitudes and corrections (Shrink prints them in the column K, they correspond to rh1-ra), the <dr(loc)> and <dr(har)> values are ignored. Note, in Shrink output the integers in the last column are simply indices of the corresponding atom pairs. In contrast, UNEX interprets them as group numbers. In reality it is very unlikely that one would leave them as they are. Normally you need to delete this column and assign group numbers manually or in an other way, as needed.

If you want to use anharmonic corrections from Shrink, the column K must be substituted with a column r_e-r_a from the very last table produced by Shrink, so the format remains for UNEX unchanged. In the example below corrections to equilibrium structure are used and the integers are removed as it is normally done.

1  O1   H2   0.9591     0.0675    0.0011    0.0000   -0.0126
2  O1   H3   0.9591     0.0675    0.0011    0.0000   -0.0126
3  H2   H3   1.5063     0.1125    0.0001   -0.0038   -0.0129

The third available format ELDIFF is for introducing data produced by ElDiff program. Here is the shortened example of such data field:

;At.pair  Num    Re     Rg     Ra     Dr    Dr(har) Dr(kin) Dr(dyn) Ampl.  c3/6
Cl1-C2   ( 1) 1.7609 1.7687 1.7672  0.0078 0.0027  0.0009  0.0042 0.0517   2.59 555
Cl1-Cl3  ( 1) 2.8755 2.8857 2.8841  0.0102 0.0018 -0.0017  0.0101 0.0668   3.76

Vibrational corrections are calculated from read data as differences Re-Ra. Amplitudes and asymmetry parameters c3/6 are read as they are given. As usually, the optional integer in the very end of line is the group number for refinement of respective amplitude or its scale factor.

If due to some reason the numeration of atoms in input data does not coincide with already defined numeration (for example, in Z-matrix), a RENUM command can be used:

1  O1   H2   0.9591     0.0675    0.0011    0.0000   -0.0126
2  O1   H3   0.9591     0.0675    0.0011    0.0000   -0.0126
3  H2   H3   1.5063     0.1125    0.0001   -0.0038   -0.0129

It works in the same way as in case of reading Cartesian coordinates. Namely, in the example above the following numeration will be done: O1→O2, H2→H3 and H3→H1. RENUM works in fields of all format types. Note, multiple RENUM commands can be defined in the same data field and UNEX will process all of them. This can be useful when large amount of atoms must be renumbered and the corresponding list would be too long for a single RENUM command.

As already mentioned integer numbers in the very end of lines are interpreted by UNEX as group numbers for amplitudes so that they can be refined. In case of dynamic GED models group numbers can be defined only for the first pseudoconformer in the psconfs list (see above). Group numbers for amplitudes of other pseudoconformers are assigned automatically and coincide with those for the first pseudoconformer.

The described AMPLITUDES command allows introducing only vibrational amplitudes and corrections. To build a complete GED model of a molecule at least a Z-matrix must be also defined. There is, however, an alternative GEDTERMS command to define all required parameters for calculation of ED molecular intensity curves


It accepts only one type of format GTRM, which assumes that each line contains a pair of atoms, ra distance, amplitude, correction (normally zero), asymmetry constant and group numbers for the distance and amplitude as shown in the example below

;At1 At2      r_a         l        corr         a       Gr     Gl
C2   Cl1    1.7625     0.05485     0.00      2.00000     3      5
C2   Cl3    1.7625     0.05485     0.00      2.00000     3      5
C2   Cl4    1.7625     0.05485     0.00      2.00000     3      5
C2   Cl5    1.7625     0.05485     0.00      2.00000     3      5
Cl1  Cl3    2.8871     0.06844     0.00      0.00000     4      6
Cl1  Cl4    2.8871     0.06844     0.00      0.00000     4      6
Cl1  Cl5    2.8871     0.06844     0.00      0.00000     4      6
Cl3  Cl4    2.8871     0.06844     0.00      0.00000     4      6
Cl3  Cl5    2.8871     0.06844     0.00      0.00000     4      6
Cl4  Cl5    2.8871     0.06844     0.00      0.00000     4      6

Note, for investigation purposes UNEX can refine ra distances independently, resulting in a so-called geometrically inconsistent structure. The corresponding group numbers for ra distances can be defined only with GEDTERMS command.

UNEX can automatically check values of parameters for symmetrically equivalent terms. This is done if symmetry has been determined for the molecule before introducing parameters for terms, for example by calling PRINT=SYMMETRY,mol. The values of amplitudes, corrections and asymmetry constants for equivalent terms will be symmetrized (averaged) if they differ. In case of significant differences, warning messages will be printed.

Vibrational force constants

In UNEX there is a possibility to introduce force constants for molecules. This is mostly used for subsequent printing of these force constansts in some other format. Harmonic force constants in system of Cartesian coordinates are introduced with F2C command:


Reading of data can be done in three formats, ARCHGAUSSIAN, FREEFC and CFOURFCM. The first one is the format of archive area in the very end of Gaussian [3] output files. Here is an example for water molecule:


 5\0\\#P PBE1PBE/6-31G(d,p) Freq\\H2O\\0,1\O,0.,0.,0.118417\H,0.,0.7569
 04485,0.1771276\Polar=3.0234315,0.,7.2833047,0.,0.,5.4419574\PG=C02V [

The option FREEFC is used when data are not formatted in any particular manner. UNEX reads floating point numbers line by line from left to right and correspondingly fills in lower-left triangle of force constants matrix. The same data for water molecule can be introduced as


 0.00000  0.69921
 0.00000  0.00000  0.47159
 0.00006  0.00000  0.00000 -0.00006
 0.00000 -0.34961  0.20819  0.00000  0.38113
 0.00000  0.27346 -0.23580  0.00000 -0.24082  0.22485
 0.00006  0.00000  0.00000  0.00001  0.00000  0.00000 -0.00006
 0.00000 -0.34961 -0.20819  0.00000 -0.03153 -0.03264  0.00000  0.38113
 0.00000 -0.27346 -0.23580  0.00000  0.03264  0.01095  0.00000  0.24082  0.22485

(reduced number of digits is given for compactness) or, for example


  -0.00011233   0.00000000   0.69921020   0.00000000   0.00000000
   0.47159438   0.00005616   0.00000000   0.00000000  -0.00006270
   0.00000000  -0.34960510   0.20818553   0.00000000   0.38113336
   0.00000000   0.27346025  -0.23579719   0.00000000  -0.24082289
   0.22485174   0.00005616   0.00000000   0.00000000   0.00000654
   0.00000000   0.00000000  -0.00006270   0.00000000  -0.34960510
  -0.20818553   0.00000000  -0.03152826  -0.03263736   0.00000000
   0.38113336   0.00000000  -0.27346025  -0.23579719   0.00000000
   0.03263736   0.01094545   0.00000000   0.24082289   0.22485174

Format CFOURFCM is used for reading force constants as they are written by Cfour program [5] in FCM files. For example:


2   12
   -0.0000000000        0.0000000000        0.0000000000
    0.0000000000        0.0000000000        0.0000000000
    0.0000000000       -0.0000000000        0.0000000000
    0.0000000000        0.0000000000        0.0000000000
    0.0000000000        0.0000000000        2.0658524394
    0.0000000000        0.0000000000       -2.0658524394
    0.0000000000        0.0000000000        0.0000000000
   -0.0000000000        0.0000000000        0.0000000000
    0.0000000000        0.0000000000        0.0000000000
    0.0000000000       -0.0000000000        0.0000000000
    0.0000000000        0.0000000000       -2.0658524394
    0.0000000000        0.0000000000        2.0658524394

Note, in this format Cfour prints full matrix of force constants and UNEX reads all data.

Cubic force constants in system of Cartesian coordinates are introduced with F3C command:


However, in this case the only available format is the ARCHGAUSSIAN. Gaussian calculates and prints cubic force constants in system of Cartesian coordinates if Freq=cubic is given in its input file.

Instead of copying data to UNEX input files it is also possible to read this data directly from other files. For this, instead of giving opening and closing tags, name of the file with the data must be provided


ED scattering factors

In UNEX so-called sM(s) functions are used as molecular intensities, defined as stem 8e84b5698e7482edf55e12fef288b540, where Imol and Iat are molecular and atomic components of the total intensity of scattered electrons. Accordingly, theoretical equations include so-called g-functions as factors characterizing scattering ability of particular pairs of atoms (see keyword SMSModel in BASE).

In UNEX calculation of g-functions can be done using GF command:


Here the last number is electron wavelength for which g-functions must be calculated. It is automatically recalculated into accelerating voltage. UNEX uses built-in tables of scattering aplitudes and phases defined for accelerating voltages 10, 40, 60, 90 keV and for s-values up to 60 Å-1. In general two-dimensional interpolating cubic splines are used for calculation of required parameters from tabulated values. The version of tables can be chosen using the SFactorsDBVer keyword in BASE. By default the most recent published values are used.

ED intensities

UNEX has a special system for referencing of all types of intensity curves. Each curve is defined as a pair of integer numbers, for example 1-1 represents in the input syntax a particular curve. This system is designed to simplify categorization of curves and is closely related to the format (see below) of their definition in UNEX input files. The most common and natural for GED basis for categorization of curves is the distance between nozzle and detector. There can be, however, other considerations how to form groups of curves, by methods of data reduction and processing, by dates of experiments, this is up to user.

Total intensity

To introduce total intensity curves INT command is used:


The simplest example of the data field is

 7.4000000000        5.8921150540
 7.6000000000        5.6976865331
 7.8000000000        5.5221522042
 8.0000000000        5.3696527781
 8.2000000000        5.2437855620
 8.4000000000        5.1021824331
 8.6000000000        4.9709462648
 8.8000000000        4.8373286097
 9.0000000000        4.7019566330
 9.2000000000        4.5680270813
 9.4000000000        4.4361494355
 9.6000000000        4.3235065367
 9.8000000000        4.2099473887
10.0000000000        4.1088546902

In the first column are s-values, in the second column are values of total electron scattering intensity. Here only one intensity curve is defined. In UNEX syntax it can be referenced as 1-1 curve. The input format requires that each data set starts with an INT keyword followed by an integer number. In the example above it is INT1, which means first goup. This is first definition of an INT1 curve, therefore it has the 1-1 reference code. You can input several data sets in the first group as in the following example

 7.4000000000        5.8921150540
 7.6000000000        5.6976865331
 7.8000000000        5.5221522042
 9.6000000000        4.3235065367
 9.8000000000        4.2099473887
10.0000000000        4.1088546902

Here the first curve from above is 1-1, the second one gets the code 1-2. In the same way a second and so on groups of intensities can be introduced:

 7.4000000000        5.8921150540
 7.6000000000        5.6976865331
 7.8000000000        5.5221522042
 9.6000000000        4.3235065367
 9.8000000000        4.2099473887
10.0000000000        4.1088546902
28.1000000000        1.0475326418
28.2000000000        1.0393546185
28.3000000000        1.0276683596
28.0000000000        1.0475326418
28.2000000000        1.0393546185
28.3000000000        1.0276683596
30.0550000000        1.0159231825

Here curves 1-1, 1-2, 2-1 and 2-2 are defined. Note, UNEX assumes no constant step on the s-scale. The only requirements are that

  • s and intensity values must be positive,

  • s-values must be sorted in ascending order,

  • there must be no equal s-values, differences smaller than MinDs are not allowed.

The UNEX input format also allows introducing standard deviations for intensity values:

6.2000000000        7.4146108106        0.0039183246
6.4000000000        7.1488355268        0.0021688941
6.6000000000        6.8938017418        0.0021065446
6.8000000000        6.6412539602        0.0020678461
7.0000000000        6.3619711300        0.0020204005
7.2000000000        6.1273418113        0.0019858103
7.4000000000        5.8921150540        0.0019449769
7.6000000000        5.6976865331        0.0019131756
7.8000000000        5.5221522042        0.0018765991
8.0000000000        5.3696527781        0.0018468983

Here as usually in the first and second columns are s and intensity values and in the third column are the respective standard deviations of the intensity values. They can be used by UNEX in different procedures, for example in least-squares refinement method. Standard deviations are optional and can be defined only for particular points:

6.2000000000        7.4146108106
6.4000000000        7.1488355268        2.0
6.6000000000        6.8938017418
6.8000000000        6.6412539602        2.0

Here we define standard deviations 2.0 for two points, for the rest default value is assumed. The default value can be defined by using GStdev keyword. Also note that in this example we define standard deviations for total intensity. However, using respective setting for the keyword TypeStdev (see below) it is possible to define standard deviations for molecular intensity sM(s), which may be later calculated from the input total intensity.

UNEX allows setting special parameters related to particular intensity curves. They are defined after corresponding INT keywords like in the example

INT1 Parameter1=value Parameter2=value
6.2000000000        7.4146108106
6.4000000000        7.1488355268
6.6000000000        6.8938017418
6.8000000000        6.6412539602

Note, there must be no space characters in pairs Parameter=value.

Set of parameters, which should be defined for each intensity curve depends on the particular UNEX application. Different procedures in UNEX may require different parameters to be defined.

Possible parameters are


Scale factor for molecular intensity curve. The default value is 1.0.


Group number in MINIMIZE procedure. If this parameter equals to a positive integer number then the respective scale factor will be refined. By default VarSc automatically assigned to a unique positive integer value. Set this parameter to zero if you do not want to refine the scale factor.


Nozzle-to-Plate — distance from diffraction point to the detector in mm. Input s-values must correspond to this value.


New nozzle-to-plate value in mm. Input s-values will be recalculated using defined NtoP and NewNtoP.


Sector-to-Plate — distance from rotating sector defice to the detector in mm.


Lambda — electron wavelength in Å. This parameter tells UNEX for which electron wavelength correspond input s-values.


New value of electron wavelength in Å. This should be defined together with Lam if you want to recalculate input s-values for the new value of electron wavelength.


t-factor — a value proportional to the exposure time in the measurement of the corresponding diffraction pattern. This parameter can be used in models for the total intensity. For description of models see introduction to the theory of background lines.


Set this parameter to CCl4, C6H6, CS2 or CO2 if the intensity corresponds to one of these compounds and you want to use it for determination of electron wavelength with STANDARD command.


Maximal allowed number of inflection points or polynom power for background lines generated in STANDARD procedures. By default the value of this keyword is negative, indicating that global setting must be used (see keyword StdDefNbgl).


Group number for electron wavelength in Monte-Carlo procedure MCMIN. Positive value indicates that electron wavelength will be randomized in MCMIN.


Standard deviation for electron wavelength in Å. It is used for randomization of electron wavelength in MCMIN.


Group number for functional q used in procedure for approximation of background line with a cubic spline. Positive value indicates that q will be randomized in MCMIN and used for recalculation of background.


Minimal value of functional q randomized in MCMIN.


Maximal value of functional q randomized in MCMIN.


Integer keyword allowing (ReadStdev=1, default) or disabling (ReadStdev=0) reading of standard deviations for intensity values.


Default value for standard deviations of intensity if they are not given explicitly in input. By default GStdev=1.0.


Type of standard deviations on input. By default they are given for total intensity (TypeStdev=int) but you can also provide standard deviations directly for sM(s) curves (TypeStdev=sms).


Number of inflection points of spline used for levelling of total intensity and background.


Power of polynomial used for levelling of total intensity and background.


Power of Chebyshev polynomial, which is used in STANDARD=LSQ procedure as a model for additive background in least-squares refinement. The default value is 3.


Type of model for total intensity, which will be used in STANDARD=LSQ procedure. Options are a1bgl (default) and a2bgl, for details see manual of STANDARD=LSQ.


Defines type of background used in STANDARD=SCANLAM and STANDARD=REFINELAM procedures. The available options are mbgl (multiplicative background, this is default), a1bgl and a2bgl (respective type of additive background) and none, which indicates that no background should be calculated.

Molecular intensity

Reduced molecular intensity sM(s) can also be directly introduced into UNEX using SMS command


where int is the intensity identificator, otag and ctag are opening and closing tags for the corresponding data field, respectively. Format of data field is simple — just two columns with s and sM(s) values. Example of the command and data field:


6.0000  -1.2163543885
6.2000  -1.0629013696
6.4000  -0.6487354615
6.6000  -0.1055888595
6.8000   0.4035742744
7.0000   0.7359056260

If the data set 1-1 has been already defined and the original number of data points coincides with the number of data in the SMS field then the newly introduced data just overwrites old values. Otherwise this data set will be (re)initialized and will contain only sM(s) data.

Experimental background

Multiplicative type of experimental background can be introduced using MBGL command


where int is the intensity identificator, otag and ctag are tags of the data field and the optional num is used when smoothing is required. The format for data field requires just two columns, with values for s and respective background:

10.0   0.208101
10.1   0.208028
10.2   0.207974
10.3   0.207913
10.4   0.207872
10.5   0.207835

Note, the s-values must be exactly the same as were introduced for the respective total intensity. However, there is a possibility to introduce background values without respectivev s-values. In this case the data are just in one column and no checks are performed:


After reading and optional smoothing the background data is used for calculation of experimental reduced molecular intensity. For details about smoothing procedure and derivation of molecular intensity see sections below regarding theory of ED background. The MBGLS command has exactly the same syntax and does the same but in addition calculates standard deviations for sM(s) from standard deviations for the total intensity. Below are some examples. Read background and calculate sM(s) for 1-1:


Read background, smooth it (by default cubic splines are used and here 3 means maximal number of inflection points) and calculate sM(s):


Read background and calculate sM(s) and its standard deviations:


Read background, smooth it and calculate sM(s) and its standard deviations:


In analogy to the MBGL command additive experimental backgrounds can be introduced using the A1BGL and A2BGL commands, which have exactly the same syntax:


The difference between commands is the model, which is used for total intensity, for details see section devoted to additive background calculation. For additional calculation of standard deviations use A1BGLS and A2BGLS variants of these commands.

ED sector function

Rotating sector is a special device in electron diffraction experiment for levelling intensity of scattered electrons so that detector can measure it in wide range of angles. Thus, sector modifies primary data, which is mathematically equivalent to multiplication of primary intensity by some function. This function depends on the shape of the sector and is called sector function.

In UNEX sector function is decomposed into two parts, analytical model part and a possible numerical correction. The model part is controlled by the SecModelType keyword. For SecModelType=rpn the model sector is

$$F = A \times \left( \frac {r}{r_{max}} \right)^n$$

for SecModelType=sinpn the model is

$$F = A \times \left[ sin \left( \frac {r}{r_{max}} \right) \right]^n$$

and if SecModelType=const the model is

$$F = A$$

The parameters A, n and rmax are controlled by the SecPrmA, SecPrmN and SecPrmRmax keywords. By default, the model sector function is

$$F = 2 \pi \left( \frac {r}{100} \right)^3$$

The other part of the sector function is the so-called reduced sector function. By default it is initialized to constant 1. However, it can be defined in the numerical form and the total sector function is then calculated as

$$S = F \times f$$

where S is the total sector function, F is the model sector function and f is the reduced sector function.

In numerical form sector function can be introduced with the SECTOR command


Here format can be READTOTAL or READREDUCED.

The READTOTAL format is used to input total sector function


 1.0	0.00000463
10.0	0.00462963
20.0	0.03703704
30.0	0.12500000
40.0	0.29629630
50.0	0.57870370
60.0	1.00000000

The data field in the example above contains distances in mm from the senter of sector and respective values of the total sector function. The reduced sector function is calculated from these values based on the current model.

The other option is the READREDUCED format. It is used for introducing of the reduced sector function directly. Below is the respective example


 8.250		1.8684053318
 8.500		1.7616089813
 8.750		1.6663497956
 9.000		1.5813559000
 9.250		1.5064034587
 9.500		1.4407076490
 9.750		1.3836521842
10.000		1.3344986762

In UNEX there is also a special sector function which can be used as regularization data in STANDARD=LSQ procedure for refinement of sector function from intensity data. This function can be introduced by the REGSEC command, which has exactly the same syntax as SECTOR:




The model for the regularization sector function is controlled by keywords with the RegSec prefix: RegSecModelType and others. By default they are initialized to the same values as for the normal sector function.

Together with values of sector function it is also possible to introduce respective standard deviations. For this the data field must contain a third column with standard deviations:

 8.250		1.8684053318   0.1
 8.500		1.7616089813   0.2
 8.750		1.6663497956   0.2
 9.000		1.5813559000   0.2
 9.250		1.5064034587   0.2
 9.500		1.4407076490   0.2
 9.750		1.3836521842   0.2
10.000		1.3344986762   0.1

Note, if total sector function is introduced the standard deviations must also correspond to the total sector function.

After introducing sector function it is possible to smooth it using natural B-splines. This is done by command


Analogous command exists for smoothing regularizing sector function:


Data processing

Detector calibration

Optical density

Diffraction images can be measured on photo materials (plates or films), which must be afterwards digitized. Devices for this purpose, microphotometers and scanners, must be calibrated for optical density of blackness. This kind of calibration is represented as a relationship between true density values D and respective values provided by a particular device. This is especially important for commercially available optical scanners, because they usually underestimate large D values. Calibration of optical density is usually done by scanning a special standard target also known as optical wedge (see Figure below), which provides areas corresponding to particular accurately known Dstd values. Comparing of calculated from scanned image D-values with respective Dstd-values shows how accurate is the scanner. This data can be afterwards used as calibration for calculation of accurate optical densities of pixels.

Calibration target
Figure 11. An example of standard target for calibration of optical density

For processing of images of calibration targets WEDGE command can be used. There are two modes of operation, automatic and manual. For the automatic mode syntax of the command is as follows

WEDGE=AUTO,img,list of standard D-values

where img is the name of image file to be processed. Note, this file must be defined in the imgfiles keyword in BASE. For example, command


will process wedge.tif image and try to recognize automatically areas with indicated optical densities. However, this mode is generally not recommended, since it can be unstable for complicated and noisy images. A better option is to use the manual mode


where otag and ctag are opening and closing tags of a field with supplementary information, for example


0.05   26 128
0.20   86 124
0.33  150 124

Here wedge.tif is processed and the data between <wed> and </wed> tags contain information about standard areas in format Dstd X Y. Dstd are standard values of optical density, X and Y are coordinates of centers of respecive areas.

Origin of coordinate system for images in UNEX is always in the upper-left corner.

Even better approach is to define not only centers of standard areas but also coordinates of their four corners:


0.05   26 128  44 4   4 2   2 264  46 270
0.20   86 124 110 6  64 2  64 254 108 258
0.33  150 124 168 6 124 6 122 246 168 256

Here after Dstd for each area pairs of coordinates X Y are given for

  1. center

  2. upper-right corner

  3. upper-left corner

  4. lower-left corner

  5. lower-right corner

In this case coordinates of centers should not necessarily be accurate.

Note, both automatic and manual modes can be influenced by MoveWedArea keyword from BASE. In fully manual mode if coordinates of corners were accurately defined it is recommended to fix them by setting MoveWedArea=no.

After processing the image of calibration target a new image is created and saved under name of original image with added _proc suffix and .tif extension. This image shows areas processed by UNEX and noisy pixels excluded from processing. Results, including calibration data, are printed in output file.

The obtained calibration can be used later in data reduction. Introducing of calibration curve is done with help of the same WEDGE command using its special syntax:


The corresponding data field is simple as in the example:


;     Dstd       Dscanner
      0.050        0.053
      0.200        0.152
      0.330        0.215
      0.460        0.274
      0.610        0.336
      0.770        0.415
      0.920        0.481
      1.060        0.540

Here in the first and second columns are given standard and respective scanner values of optical densities.

Sector images

For determination of sector functions it is possible to use images of sector devices. A sector should be scanned with highest possible spatial resolution. The image must be in 8- or 16-bit grayscale uncompresssed TIFF format. Before processing the image must be prepared so that pixels of the sector surface have values corresponding to exactly black color and the rest of pixels must be exactly while. The intermediate grayscale values are not allowed.

Figure 12. Original (left) and prepared for processing (right) image of sector device.

For the processing of the image several parameters should be defined:

  • Coordinates (in pixels) of the center of the sector. They can be estimated from the image manually.

  • Range of distances (in mm) from the center of sector, which should be processed.

  • Step size (in mm) for the processed distances.

Additionally, particular resolution values can be defined for the image, if they differ from the ideal values. Note, internally UNEX determines numerically the total sector function, which has values in the range [0,1]. This function is converted to the reduced sector function on the basis of the current sector model. Therefore it is advised to define explicitly a sector model, which fits your sector most closely. Remember, the determined reduced sector function is valid only for the model, which was defined in the processing of the sector image.

Below is an example of UNEX input for processing of sector image.




Data reduction

UNEX implements procedures for data reduction, i.e. for transformation of 2D images of measured diffraction patterns to 1D curves of experimental electron scattering intensity functions. Images must be in uncompressed 8- or 16-bit grayscale TIFF format with little-endian byte order. For introduction of images in UNEX the imgfiles keyword in BASE must be used. The major procedure for data reduction [6] is started by command


where imgfile is the name of image TIFF file to be processed.

Before processing it is highly recommended to clean images of diffraction patterns. The cleaning procedure is essentially a setting of absolute white grayscale level to pixels, which do not correspond to the diffraction pattern itself or represent data areas, which should not be processed due to any other reason (defects, etc.). The Figure below demonstrates an initial image with shadows on the diffraction pattern due to construction elements in diffraction chamber and the shows a resulted image after cleaning. Note, graphical software used for these purposes should not alter values of valid pixels. Check this before using the software in real investigations!

Figure 13. Image of electron diffraction pattern of CCl4 before (left) and after (right) cleaning.

Modification of ED intensity

The INT command can be used not only for introducing total electron scattering intensity functions but also for their modification. In this case the general syntax is


where jobtype is the type of modification, int1 and possibly int2 and so on are intensity identificators. The types of modification are

  • S4MLT — multiplication by s4 function.

  • INORM — calculates integral of total intensity and normalizes intensity on this integral value.

  • RSECDIV — divides total intensity by reduced sector function.

  • SPLDIV — total intensity approximated by cubic spline and divided by this spline. By default number of inflection points for the spline is zero. This number can also be defined in the command.

  • SMOOTH — smoothing total intensity using natural B-splines.

  • SCALE — more than one curve must be defined, the first curve remains unchanged, the other curves scaled so that they fit the first curve best.

  • TSCALE — intensity values are divided by t-factor.

Note, if standard deviations were defined for the total intensity, then their values are also modified accordingly.

For modifying experimental molecular intensity functions a similar command SMS with the same syntax exists


The available jobtype is

  • SMOOTH — smoothing of molecular sM(s) intensity using natural B-splines.

ED background lines

In gas electron diffraction structural analysis is performed on the basis of molecular part of total intensity. In ideal case to some approximation total electron diffraction intensity can defined as

$$I_{tot} = I_{mol} + I_{at}$$

where Imol is its molecular part (i.e. function depending on molecular dynamics and geometry) and Iat is the atomic part — a function depending only on properties of atoms but not on their relative positions. In reality the measured total intensity also contains some additional extraneous additive background B:

$$I_{tot} = I_{mol} + I_{at} + B$$

Note, the total intensity and all its components are here per unit time, i.e. they are flux values. In real experiments signal is accumulated over finite time, so in general case the model for the total intensity must include a t-factor proportional to exposure time:

$$I_{tot} = t \times (I_{mol} + I_{at} + B)$$

In this case Itot can be directly compared with experimental data. If rotating sector is used, it modifies the measured total intensity. Mathematically this can be defined using sector function S in several ways, like

$$I_{tot} = t \times S \times (I_{mol} + I_{at} + B)$$


$$I_{tot} = t \times S \times (I_{mol} + I_{at}) + B$$

or even with two components of the background

$$I_{tot} = t \times S \times (I_{mol} + I_{at} + B_1) + B_2$$
Multiplicative background

Lets assume that the total intensity can be described by the model

$$I_{tot} = t \times S \times (I_{mol} + I_{at} + B)$$

This expression can be rewritten as

$$I_{tot} = t \times S \times I_{at} \times (M + 1 + \beta)$$

where M and β are reduced molecular intensity and reduced additive background, respectively:

$$M = \frac{I_{mol}}{I_{at}}  \qquad  \beta = \frac{B}{I_{at}}$$

This can be further modified to

$$I_{tot} = t \times S \times I_{at} \times (1 + \beta) \times (1 + \frac{M}{1 + \beta})$$

From here an exact expression for the sM function can be easily obtained as

$$sM = (1 + \beta) \times \frac{I_{tot} - \Phi}{\Phi} \times s$$

where function Φ is the so called multiplicative background, defined as

$$\Phi = t \times S \times I_{at} \times (1 + \beta)$$

The advantage of the last expression for the sM is that it has no sector function S in explicit form. If the sector function is smooth (i.e. the sector device is of good quality) and experimental conditions result in smooth background β then the multiplicative background Φ must also be smooth. However, separation of the two smooth functions, β and Φ is a very ill-posed problem and in real practice an approximate formula is used for calculation of experimental sM function:

$$sM \approx \frac{I_{tot} - \Phi}{\Phi} \times s$$

This expression becomes exact if extraneous background is zero, which is never achieved in real experiments. However, in least-squares method scale factors for sM curves are usually refined to compensate for this problem. If experimental sM curves are obtained by accounting for multiplicative background as shown above then their refined scale factors k can be defined as

$$k = \frac{1}{1 + \beta}$$

Clearly, in real cases they are less than 1 due to positive β. The smaller is the background, the closer is the k to 1. If refined scale factors are larger than 1, this is strong indication of deficiency of theoretical model for describing of experimental sM. It should also be mentioned, that the presence of a large background does not necessarily lead to significant inaccuracies in the obtained experimental sM curve. Much worse is a possible deviation of forms of functions B and Iat, making β non-constant in range of working diffraction angles and, as such, not allowing for compensation with a single scale factor k.

Technically, multiplicative background is estimated on the basis of calculated model molecular intensity sMmod. First, the model background is obtained from

$$sM_{mod} = \frac{I_{tot} - \Phi_{mod}}{\Phi_{mod}} \times s$$

In real practice the calculated Φmod is not smooth and can contain oscillations due to inexact sMmod and experimental noise from the total intensity Itot. On the next step Φmod is smoothed using splines or polynoms. The obtained in this way line is called experimental background Φexp and is used for calculation of the experimental molecular intensity

$$sM_{exp} = \frac{I_{tot} - \Phi_{exp}}{\Phi_{exp}} \times s$$

which can be afterwards used in structural analysis, for example in least-squares method. Thus, the background Φexp is in fact model-dependent and, as a consequence, the so called experimental molecular intensity sMexp is to some sort also model-dependent. To overcome this problem it is recommended to refine the model on the basis of the obtained sMexp and to use the updated sMmod for estimation of a new experimental background and a more accurate experimental sMexp. This procedure should be iteratively repeated until self-consistency.

In UNEX there is a command MBGL for obtaining smoothed experimental multiplicative background lines and corresponding experimental molecular intensities. The general syntax of the command is as follows:


Here int1, int2 and so on are the identificators of the intensity curves to be processed and the final integer is the number of inflection points for splines (default) or the order of polinomial function used for smoothing of the background. This depends on the setting of GedBglApproxType in BASE. The less is the number, the smoother is the calculated background line. Note, it is possible to define several intensity curves in one command but they will be processed sequentially and independently. For example, the command


is equivalent to two sequential commands


There is also a similar command MBGLS with the same syntax as for the MBGL.


MBGLS does the same as MBGL and additionally calculates standard deviations for experimental sM(s) from corresponding standard deviations for the total intensity and taking into account the background line. Note, standard deviations for the total intensity must be defined to some reasonable values.

UNEX also provides a possibility to control approximation of the background with cubic splines. This is done with special anchor points, defined in respective MBGL or MBGLS command. For example, the command

MBGL=1-1,2   3.0,0.94,0.1    3.4,0.96,1.0

starts a procedure for the calculation of a multiplicative background for the intensity curve 1-1, which should have no more than two inflection points. Additionally, a two triples of numbers are indicated. These are the anchor points. In each triple the first number is the argument s-value, the second is the background anchor value and the third is its weight factor. Thechnically, anchor points just substitute corresponding points of Φmod, so the anchor arguments must coincide with the corresponding arguments in original data. The procedure should approximate background so that the calculated cubic spline goes close to anchor points. The larger are the weights of the archor points, the closer background line will be to them. The final result can also be influenced by the constraint on the amount of inflection points. Finding optimal anchor points is in general a manual trial-and-error procedure. The number of anchor points is not limited.

For compatibility reasons UNEX accepts BGL as an alias for the MBGL command. It is advised, however, to use the MBGL since BGL can be removed in future versions of UNEX.

As has been pointed out above the MBGL command calculates model-dependent background because of the usage of model sM(s) function. The recalculated background, and as a consequence, updated experimental sM(s) can be used to refine model parameters, including the scale factor k for the molecular intensity. In UNEX it is possible to refine the best scale factors k internally in the MBGL command. This is an iterative procedure, which can be turned on by setting the keyword BglRefScaleMaxIter to some positive value, for example 30. The convergence criterium of this procedure can be controlled by the optional keyword BglRefScaleTol.

It is important to note that the quality of background line strongly depends on how total intensity is levelled. This property strongly depends on the form of sector device used in experiment. Best of all if values of total intensity are in narrow range of values for all difraction angles. In this case the default procedure for smoothing of background lines works well and the amount of inflection points serves as a good indicator of background quality. However, this criterion is not significant if intensity curve changes too quickly. A possible solution of this problem is to smooth reduced (divided by sector function and atomic scattering) background by setting BglSmoothReduced=1. This requires introduction of a sector function. Note, for this particular procedure the sector function must not be very close to real sector. It is enough to define calculated values for your type of sector. The most important is to ensure that this function together with atomic scattering lead to a well levelled reduced total intensity. The figures below demonstrate a case for total intensity of CCl4. The first two demonstrate results of the default procedure when only 3 inflection points are allowed. It is impossible to assess the quality of the total background line (on the left side). However, in the reduced form (on the right side) the relatively low quality of the background is clear. In contrast, smoothing of reduced background leads to a line of much superior quality as the figure below shows. It should however be noted that higher quality background lines naturally lead to higher R-factors.

Figure 14. Unmodified (left) and reduced (right) total intensity and background curves when BglSmoothReduced=0.
Figure 15. Unmodified (left) and reduced (right) total intensity and background curves when BglSmoothReduced=1.
Additive background

Averaging of ED data

In UNEX there is a possibility for averaging ED intensity curves with an AVERAGE command. The general syntax of the command is as follows:

AVERAGE=itype,int1,int2,...,intn [> oint]

Here itype is the type of intensity data to be averaged; int1, int2 up to intn are identificators of intensity curves as input data for averaging; > oint is the optional argument with explicit identificator for output averaged data. Output data set oint must not necessarily by initialized before calling AVERAGE. However, if it was already initialized, the data will be overwritten. If you do not define oint explicitly then a new set of data will be initialized and its identificator will be printed to output. itype can be one of the following:

  • INT — averaging total intensity curves

  • INTS — averaging total intensity with calculation of standard deviations

  • SMS — averaging experimental sM(s) intensity curves

  • SMSS — same as SMS but with calculation of standard deviations

Experimental sM(s) must be initialized, i.e. introduced in UNEX or determined in background procedure from total intensity. If background procedure is used for curves with unrefined scale factors, it is advisable to set the BglRefScaleMaxIter keyword in BASE to some positive value so that scale factors are adjusted to some reasonable values.

Note, averaged intensity values are calculated for s values of the first curve int1 defined in the command. If points of the other curves are defined not in the same s values then interpolation with cubic splines is used.

In addition to averaging of data and optional calculation of standard deviations AVERAGE command also calculates experimental R-factors. For each of the curve, participating in averaging procedure, individual experimental R-factors are calculated as

$$R_{exp} = \sqrt{\frac{\sum_{i=1}^{N} w(I(s_{i}) - I_{av}(s_{i}))^2}{\sum_{i=1}^{N} wI_{av}(s_{i})^2}} \times 100\%$$

where stem 571768d4d9f628e9fbe82eca5c6633d9 is the i-th point of the intensity curve, for which the R-factor is calculated, stem d3bcfa31f0ea78cb02af693864dba1e2 is the corresponding point of the averaged intensity with weight stem f1290186a5d0b1ceab27f4e77c0c5d68, N is the total number of intensity points. Intensity I is the total intensity if INT or INTS is defined, or sM(s) in case of SMS or SMSS. Individual experimental R-factors show how much each of intensity curves deviates from the average curve. This information allows to sort out curves of low quality. An average value of individual Rexp is also printed. Regarding weighting, UNEX calculates two types of experimental R-factors:

  • with account of weights stem f1290186a5d0b1ceab27f4e77c0c5d68, which are calculated from respective standard deviations of the averaged curve as stem 782177c56e139dd60d23117dba352991.

  • without weighting, assuming all stem feba76141098012bd61d0d0c0c256e7e.

Note, in INT and SMS modes standard deviations are not calculated so both types of experimental R-factors are equal. Weighting works in SMSS and INTS modes, when standard deviations for the average curve are calculated.

Next UNEX calculates total experimental R-factor as

$$R_{exp} = \sqrt{\frac{\sum_{i=1}^{M} \sum_{j=1}^{N_i} w(I(s_{ij}) - I_{av}(s_{ij}))^2}{\sum_{i=1}^{M} \sum_{j=1}^{N_i} wI_{av}(s_{ij})^2}} \times 100\%$$

Here summation is performed for all points of all M intensity curves. I can also be total or molecular sM(s) intensity, depending on averaged data type. The total experimental R-factor allows to represent numerically the overall reproducibility of experimental data and their general quality. Weighted and non-weighted total and average experimantal R-factors are calculated.

The advantage of experimental R-factors based on total intensities is that no molecular model is needed for their calculation. However, the absolute values of such Rexp are generally meaningless. They can mostly be useful for comparison of data sets produced only by the same experimental setup. In contrast, experimental R-factors on the basis of sM(s) curves are directly comparable with structural R-factors:

$$R_{str} = \sqrt{\frac{\sum_{i=1}^{N} w_i(sM(s_i)_e - sM(s_i)_m)^2}{\sum_{i=1}^{N} w_i(sM(s_i)_e)^2}} \times 100\%$$

where stem eaae8c972f19c30e466fcb62817a4186 and stem dcd24072201168cefbf570cc9f9f6031 are the experimental and model sM(s), respectively.

Rstr indicates level of disagreement of the model with experimental data, while Rexp indicates reproducibility of experimental data. There can be several situations:

  • RstrRexp, data are reproducible but model cannot describe them; the model should be improved.

  • RstrRexp, model describes data too well, probably not reproducible data features are fitted; better data are needed.

  • RstrRexp, optimal solution if both values are small.

Note, if both Rstr and Rexp are large, then something went completely wrong, first of all in experiment and/or in data reduction. Also note that weighted Rstr (named wRd in UNEX output) should be compared with weighted Rexp, likewise non-weighted Rstr should be compared with non-weighted Rexp.

Below are several examples of averaging commands.

  • Simple averaging of intensity curves 1-1, 1-2 and 1-3. A new average curve is created and assigned to an automatically chosen identificator.

  • Same as above, but also standard deviations are calculated for the averaged data.

  • Similar to the first example. Here the output average curve is accessible using the 1-4 identificator.

    AVERAGE=INT,1-1,1-2,1-3 > 1-4
  • Averaging experimental sM(s) curves 2-1, 2-2, 2-3 and 2-4. The output data is written to 3-1.

    AVERAGE=SMS,2-1,2-2,2-3,2-4 > 3-1
  • Averaging experimental sM(s) curves with calculation of standard deviations. The output data are written to a new automatically generated set with a new identificator. It is written in log file.


Combining of ED data

Another possibility of converting multiple ED curves into a single curve provides COMBINE command. It has exactly the same syntax as the AVERAGE

COMBINE=itype,int1,int2,...,intn [> oint]

but in general case does a different job creating a new curve with s-values present in all input curves (AVERAGE takes s only from the first input curve). Thus, curves with different s-ranges can be combined together. For the overlapping areas averaged values are calculated. If standard deviations were initialized for the respective data sets, weighted averaging is used, where weights are calculated as reverse squares of respective standard deviations. The Figure below demonstrates how COMBINE works for two experimental sM(s) curves obtained from different nozzle-to-detector distances. The respective command was

COMBINE=SMS,1-1,2-1 > 3-1
Figure 16. Original (left) and combined experimental sM(s) curves (right).

ED radial distribution functions

Radial distribution functions in UNEX are calculated and printed by the RDF command:


The argument(s) of the command is a list of one or more ED intensity curves with initialized sM(s) functions. The calculation is essentially a sine-Fourier transformation of the respective experimental and model sM(s) curves:

$$F(r) = \int_{s_{min}}^{s_{max}} sM(s) sin(sr) ds$$

If several curves are provided in the list of arguments, they are concatenated before Fourier transformation, for example


Note, the curves must have common range of s-values. The concatenation procedure includes relative scaling of curves, reinterpolation to common argument values (if required) and weigted averaging in common ranges of argument. Next, there are three general modes for calculation of radial distribution functions, which directly influence the minimal and maximal values of integration argument s. The modes, controlled by the FurType keyword in BASE, are as follows:

  • old, the most simple method, takes (combined) experimental sM(s) curve and performes integration in the range of s-values in which this curve is defined. The resulting radial distribution function usually looks not nice since integration starts from smin not equal to zero.

  • classic, a more advanced method, in which experimental sM(s) curve is supplemented with respective model curve on the left side before integration. This is done in order to get an "experimental" curve, which starts from s=0. This, in turn, stabilizes integration and improves the overall appearance of the radial distribution function. Note, this makes sense if model sM(s) function fits well the experimental data. On the right side the experimental curve remains unchanged and integration is done till maximal s value for which the curve is defined. This can lead to problems with integration since at maximal experimentally achievable s-values of 30-40 Å-1 sM(s) functions are numerically not enough converge to zero. To overcome this problem the experimental sM(s) can be multiplied by an exponential function for damping, see keyword FurDamp in BASE. Note, this procedure leads to broadening of peaks on the radial distribution function and to reduction of its resolution.

  • modern, the most advanced method, which supplements experimental sM(s) with model data not only on the left side as in the classic variant but also on the right side, so that smax is as large as possible (60 Å-1 in current implementation). This allows to avoid usage of damping exponential function and, as a result, leads to improved resolution of F(r). However, to obtain good results the model function must fit experimental data well.

Below are examples of RDFs for benzene using different options of FurType:


classic and modern methods improve appearance of radial distribution functions by supplementing experimental sM(s) functions with model data. Thus, the obtained experimental RDF curves are in fact semi-experimental. Keep this in mind during their analysis.

Below is the graphical representation of the influence of damping function on the RDF in case of benzene when FurType=classic and experimental data available only up to 30 Å-1. If the damping is turned off, i.e. FurDamp=0.0, the RDF has multiple false peaks. An optimal value of damping factor removes these peaks. Too large value of the damping factor increases widths of true peaks so that the resolution of RDF is too low.


The next issue in calculation of RDF is connected with representation of contributions of different terms in sM(s) functions. In a crude approximation the contribution of a pair of atoms to diffraction pattern is proportional to the product of their atomic numbers. The respective RDF in this case can be easily analysed. In reality, however, contributions of atomic pairs to diffractions patterns are not constant on the s-scale and are even not linear (this property is characterized by g-functions). As a consequence, the calculated RDF is difficult to analyze. Fortunately, ratios of many g-functions for different types of atoms are much closer to constants than g-functions themselves. Therefore UNEX provides a possibility to divide the integrated sM(s) data by a g-function, see FurDivGf keyword in BASE. This can improve the appearance of the obtained RDFs. By default for this purpose UNEX chooses g-function for the pair of atoms with maximal product of atomic numbers. Note, however, that this logic can fail in molecules containing atoms with very different atomic numbers. In this case some g-functions can go through zero and change sign. Accordingly, RDF cannot be obtained by integration of sM(s) modified by such a g-function. In this case an optimal g-function can be chosen manually by using FurDivGfAtoms keyword.

In case of benzene the influence of FurDivGf is as follows:


For obtaining RDFs integration is done numerically. For this UNEX implements two methods, simple trapezoidal and more accurate but slower Romberg method. In most cases the first method is accurate enough and is used by default. Switching between integration methods is done by FurIntegMethod keyword in BASE.

Regarding r-values, for which RDFs are calculated, two schemes are implemented in UNEX:

  • If FurAdaptiveR=1 (by default it is =0, i.e. turned off) the so-called adaptive step size is used depending on the local curvature of the RDF in each point so that obtained function is accurate enough for numerical analysis.

  • For purposes of visual analysis RDF is calculated on fixed grid of r-scale, where step is determined by the FurRdr keyword. However, for better appearance some points can be skipped, so that in general they are arranged nearly equally dense along the RDF line and not along the r-scale. This is default and controlled by the FurPruneRlen keyword.

The RDF defined above as integral F(r) is essentially the distribution P(r)/r, where r is the distance between atoms and P(r) is its distribution function. The first moment of the function Pij(r)/r for a particular pair of atoms ij is the ra type of thermally averaged distance between these atoms. Thus, RDFs calculated as described above show peaks centered at ra distances. There is, however, a possibility to obtain RDF defined as P(r), which is more natural. For this, UNEX can multiply the integral by r, see FurMultR keyword. In this case the peaks are centered at rg distances between atoms. Note also that this procedure naturally increases the difference curve (difference between model and experimental RDFs) proportionally, so this should not be misinterpreted as a worsening in the model fit. Below is such an example using data for Ph-CH2-CH2-CH2-Se-CF3 molecule. Note again, both RDFs were obtained for exactly the same experimental data and model. The advantages of the P(r) function are clearer physical meaning and more distinct visibility of contributions from terms with large interatomic distances. In contrast, the P(r)/r function effectively hides discrepancies between data and model, which hinders analysis. Therefore in UNEX the default setting is FurMultR=1 so that P(r) RDFs are generated.


UNEX can also calculate pure model radial distribution functions if the RDF command is called without arguments. In this case the printed experimental and model curves are the same. They are computed from a corresponding model sM(s) function, which is in turn calculated internally for the range controlled by the keywords GFsmax, GFsmin and step size GFstep.

If your experimental molecular intensities have meaningful standard deviations it is possible to calculate errors of experimental RDFs by switching the FurCalcStdevs keyword on. Standard deviations for sM(s) can be defined in input file as absolute values, calculated in averaging procedure or in background procedure from respective errors of total intensity functions. Standard deviations for sM(s) are also estimated in MINIMIZE but should be used with care in case of large R-factors. Below in Figure simulated molecular intensity functions for 1,2-dichloroethane (1:1 mixture of anti and gauche conformers) are shown. Random Gaussian noise, with standard deviations 0.03 for the curve above and 0.025 for the other curve, was added to the simulated experimental data.

Figure 17. Simulated experimental (dots) and model (lines) sM(s) molecular intensity functions for 1,2-dichloroethane and respective difference curves. Error bars and gray areas around differences correspond to ±1σ.

These data were used to calculate model and experimental RDFs with respective standard deviations. The obtained data are plotted on the Figure below. Note, the calculation was done with FurMultR=1, that is RDFs corresponding to P(r) were calculated. Therefore oscillations of the difference curve and the standard deviations increase when r increases.

Figure 18. Experimental (dots) and model (line) radial distribution functions of type P(r) for 1,2-dichloroethane. Error bars and gray area around the difference curve below correspond to ±1σ.

Alternatively UNEX can calculate more traditional RDFs of type P(r)/r by switching the FurMultR keyword off. Usually in this case standard deviations are distributed approximately equally along r scale. The Figure below demonstrates P(r)/r for 1,2-dichloroethane calculated from the simulated sM(s) data shown above.

Figure 19. Experimental (dots) and model (line) radial distribution functions of type P(r)/r for 1,2-dichloroethane. Error bars and gray area around the difference curve below correspond to ±1σ.

For graphical interpretation of RDFs it is useful to print also interatomic terms and their contributions with PRINT=GRAPHTERMS,mol command(s). RDF and terms can be plotted together, which simplifies analysis. As a possibility, FurPlot program can read and plot this data automatically.

Refinement of molecular parameters

Refinement of all kinds of parameters in UNEX is closely associated with the term group. Group is a list of parameters tied by particular constraints. Most often the constraints are fixed differences between values of parameters within each group. In case of vibrational amplitudes for interatomic distances there is also a possibility to fix their ratios within each group instead of differences (see GedVarAmplScale keyword). The number of parameters in a group is not limited. However, only particular kinds of parameters can be grouped together. Formally a group can also consist of only one parameter. In this case the respective parameter is not tied to any other parameter in refinement procedures. Groups are defined by unique integer numbers. Each parameter can be defined with its respective group number. Multiple parameters with the same group number are combined together to a single group and refined with fixed differences or ratios. By default parameters are defined without group numbers, which is the same as to define group number 0. If you want to refine parameters, you have to define their group numbers larger than zero explicitly. For refinement procedures the amount of variables is equal to number of active groups. Thus, multiple parameters in a group in fact act as a single parameter in least-squares refinement. Consequently they share the same estimated standard deviation as a group, not as they had individual but equal standard deviations!

Below is the list of parameter types, which can be refined in UNEX.

  • Geometrical parameters of Z-matrices. See respective chapter on how to assign group numbers to these parameters. Parameters of the same type can be combined together in a signle group, for example a distance can be combined only with other distances. It is generally impossible to combine different types of geometrical parameters into a group. However, it is allowed to combine angles and torsional angles. Note, geometrical parameters of different molecules can be tied together in one group.

  • Interatomic distances ra can be refined independently. See GEDTERMS command on how to define respective groups.

  • Vibrational amplitudes of interatomic pairs. Respective groups can be defined in the same fields as the values for amplitudes. Alternatively, there are possibilities to group amplitudes (semi-) automatically after their definition (see below). As for geometrical parameters, amplitudes of different molecules can be grouped together.

  • Mole fractions for molecules in mixtures, see parameters amount and varx in molecular fields.

  • Parameters of potential functions in dynamic GED models of molecules.

  • Scale factors for GED molecular intensity functions, see VarSc keyword in field of intensity curves.


UNEX provides several refinement procedures. The most important one is the minimization of least-squares (LS) functional with MINIMIZE command. Its general syntax is

MINIMIZE=functional(s) [data] [groups]

Type of functional is required parameter of the command, data should be defined in case of ED, groups can be defined or prohibited explicitly but this is optional (see below). There are several types of functionals:

  • GEDSMS — molecular part of electron diffraction intensity in form of sM(s).

  • ROTCONST — rotational constants.

  • REGPRM — regularization parameters, also known as flexible constraints or restraints.

In most general form the complete functional is represented as

$$  \Phi = \sum_{i} w_i \left( s_i M_i^{model} - s_i M_i^{exp} \right)^2 + \alpha_{rot} \cdot \sum_{j} w_j \left( B_j^{model} - B_j^{exp} \right)^2 + \alpha_{reg} \cdot \sum_{k} w_k \left( p_k^{model} - p_k^{reg} \right)^2 \rightarrow min$$

Here the first, second and third terms correspond to GEDSMS, ROTCONST and REGPRM types of functional, respectively. The relative global weight factors stem daf99ec954ee13e5f07ca64cb9a7129e and stem 9048de575c02c5e3babc3464b3be0ec0 are defined by the keywords RotConstAlpha and RegAlpha, respectively. If GEDSMS is given, particular ED intensity curves must be provided explicitly for constructing functional, for example


Individual weights stem aa38f107289d4d73d516190581397349 for the sM(s) data points are calculated automatically from their standard deviations as stem 1b90b2e9f6554b38cece186e89c34502. The other types of functional do not require explicit indication of data. ROTCONST automatically includes all defined rotational constants for all molecules and for their isotopologues, see keywords ExpRotA, ExpRotB and ExpRotC. Their weights are calculated in the same manner as for ED data from respective standard deviations defined with keywords SigRotA, SigRotB and SigRotC. Functional REGPRM uses data, which should be read in using the respective command REGPRM. The syntax of the command is simple:


The only available format is SIMPLE, which is demonstrated in the following example:


1     1.49      0.001
2   110.0       0.1
3     0.05      0.01

Here in the first column group numbers are indicated. In the second and third columns regularization values for parameters and respective individual weighs are defined. In the equation above they correspond to stem 39f11a03eed4d853314c9f414c696c65 and stem 0df9cc6763484db7df8a7418bff18a65. Note, the regularization values are applied to the first parameters in groups, the other parameters in the groups are regularized automatically to the same extent due to rigid constraints. Regularization must not necessarily be used for all refined parameters, it is possible to define restraints only for selected groups.

Minimization of the LS functional can be done using two methods:

  • Levenberg-Marquardt method [7, 8] for solving non-linear least squares problems.

  • One-dimensional golden section search [9].

A particular method to use (or a combination of methods) can be chosen with the MinMethod keyword. All methods are iterative, the maximal allowed number of iterations is defined by keyword MaxIter. Iterations stop in several cases:

  • Relative change in functional is less than threshold value (see keyword LsqFunTol).

  • Maximal relative parameter addition is less than threshold value (see keyword LsqAddTol).

  • Maximal relative gradient (partial derivative of functional with respect to some refined parameter) is less than threshold value (see keyword LsqGrdTol).

  • Parameter Lambda in Levenberg-Marquardt method increased too many iterations in a row (see keyword LsqLamMaxInc).

  • Maximal allowed number of iterations performed.

In UNEX there are two different weighting schemes in LS analysis: relative and absolute. They influence calculation of standard deviations of refined parameters. With absolute weights the matrix of covariances (with squares of standard deviations of parameters as diagonal elements) is obtained directly as inverse of normal matrix. In case of relative weighting the calculated cofactor matrix (the inverse of the normal matrix) is multiplied by factor stem 4cf49bc23ac1dce8868e5ab0ab8be5c2, where v is the number of degress of freedom, calculated as number of data points munis number of refined parameters v = Ndata - Nprm. The switching between absolute and relative weighting can be dome using the MinAbsWeighting keyword.

Depending on settings MINIMIZE can print different types of data for information on minimization status, properties, convergence and so on:

  • Total absolute and relative values of functional stem 2f51310acab41649af988ccebfe4186d designated in output as X^2. The relative values are printed during iterations of solving LS problem. In this case the initial value of the functional is scaled to be 1.0 and the following values are relative to this initial unity.

  • Lambda is the parameter in Levenberg-Marquardt method [7, 8] for improving convergence. Stable minimization is accompanied with decreasing of this parameter.

  • Rf and wRd are printed in case of using electron diffraction data. The first one is the regular R-factor calculated without weights:

    $$R = \sqrt{\frac{\sum_{i=1}^{N} (s_i M_i^{model} - s_i M_i^{exp})^2}{\sum_{i=1}^{N} (s_i M_i^{exp})^2}} \times 100\%$$

    The other, wRd, is a R-factor with diagonal weighting:

    $$wRd = \sqrt{\frac{\sum_{i=1}^{N} w_i(s_i M_i^{model} - s_i M_i^{exp})^2}{\sum_{i=1}^{N} w_i(s_i M_i^{exp})^2}} \times 100\%$$

    Note, on iterations total R-factor values are printed, i.e. the summations are performed for all data points of all intensity curves, if several are used. Individual R-factors for particular intensity curves are printed after minimization.

  • RMSD and wRMSD are printed for rotational constants. RMSD is the root-mean-square deviation, calculated as

    $$RMSD = \sqrt{\frac{\sum_{i=1}^{N} (B_i^{model} - B_i^{exp})^2}{N}}$$

    where N is the total number of rotational constants.

    wRMSD is the weighted variant of the root-mean-square deviation:

    $$wRMSD = \sqrt{\frac{\sum_{i=1}^{N} w_i(B_i^{model} - B_i^{exp})^2}{\sum_{i=1}^{N} w_i}}$$
  • When regularization data are used, the respective part of the total functional (see equation for stem 2f51310acab41649af988ccebfe4186d above) is printed as RegQ.

After minimization several blocks of data are printed:

  • Information on the convergence of the procedure.

  • Statistics for the data and model:

    • Number of degrees of freedom (number of data points minus number of refined parameter groups).

    • Condition number (ratio of maximal and minimal singular values of normal matrix). Large values can indicate numerical instability.

    • Goodness-of-fit value printed in case of absolute weighting. It is defined as 1-Q, where Q is the probability that the functional stem 2f51310acab41649af988ccebfe4186d should exceed its refined minimal value by chance. Small values (close to zero) of goodness-of-fit can indicate that (i) model is not adequate, (ii) standard deviations for data points are probably larger than stated, (iii) measurement errors are not normally distributed. On the other hand values of goodness-of-fit close to or equal 1 can indicate that defined standard deviations of data points are too large/pessimistic.

    • Values of functional parts.

    • Different R-factors, RMSD/wRMSD, estimated standard deviations for data (ESD), etc.

  • Table with refined parameter values, their absolute and relative errors and partial derivatives of total functional with respect to these parameters. Errors of parameters are least-squares standard deviations multiplied by factor PrintEsdFactor.

  • Optional tables with contributions of functionals to refined parameters (see CalcFuncProportion keyword).

  • Matrix of correlations.

  • Table with correlations above 0.5, if there are any.

  • Optional table with stem 2f51310acab41649af988ccebfe4186d (hyper)ellipsoid (see MinPrintEllipsoid keyword).

Several types of functional can be combined in MINIMIZE. For example, the following command


refines parameters from rotational constants and indicated ED data simultaneously. In the same manner all three types of data can be used


As already stated refinement of particular parameter groups can be (dis)allowed. By default all parameters with group numbers greater than zero are refined. If group numbers are defined explicitly in MINIMIZE then only parameters in these groups will be refined. The following example demonstrates how to refine parameters only in groups 1 and 2.


The other possibility is to prohibit refinement of parameters from particular groups. In the following example parameters from all groups except group 5 are refined:


Several groups can also be excluded from refinement:

MINIMIZE=GEDSMS,1-1 !5,!6,!26

Combinations of permisive and prohibitive definitions of groups are meaningless. The command


is equivalent to


i.e. refines parameters only from the first group.


In case of relative weighting of data in least-squares functional the factors stem daf99ec954ee13e5f07ca64cb9a7129e and stem 9048de575c02c5e3babc3464b3be0ec0 should have appropriate values. The problem is that there is no single clearly defined criterion for their optimal values. Usually these factors are adjusted according to specific requirements of a particular investigation (see discussion of the problem in [10]). There are, however, some heuristic criteria. One of them is implemented in UNEX [11] (detailed description is given in [1]). The respective command is OPTALPHA:

OPTALPHA=functional(s) [data] [groups]

The syntax above is the same as for MINIMIZE. In fact this is an iterative procedure, which internally starts MINIMIZE on each iteration. Note, the procedure is implemented only for cases when two types of functional combined together.

Always analyse result(s) of this command! Check whether the obtained alpha parameter fits your needs. In many cases it can be used only as a starting point for further search of optimal values.


The described above command for minimization of LS functionals implements the main procedure in UNEX for these purposes. A more complex method is provided by the ROBUSTM command. In contrast to MINIMIZE it modifies weights of experimental data using bisquare weights scheme of Tukey [12, 13]. Accordingly, standard deviations of data points are adjusted. The weights are calculated iteratively from respective residuals. In fact ROBUSTM internally starts MINIMIZE procedure on each iteration, refines model and updates weights of all data points. This procedure is repeated until weights are converged or the limit for number of iterations is achieved (see MinRobMaxIter keyword). As the last step a normal minimization is performed and results are printed as usually from MINIMIZE. The syntax for ROBUSTM is the same as for MINIMIZE:

ROBUSTM=functional(s) [data] [groups]

By design ROBUSTM always leads to (significantly) lower functional values, better wRd-factors and wRMSD values in comparison to those from conventional MINIMIZE procedure. This is due to adjusted weights based on respective residual values. Thus, this procedure effectively masks disagreement of model with experimental data. Do not use ROBUSTM if there is any chance that your residuals contain systematic component!

MINIMIZE and ROBUSTM are local methods for optimization of models. This means that they typically converge to local minima depending on starting approximation. With these methods there is no possibility to know exactly whether obtained solution corresponds to global minimum on the functional (hyper)surface. For this purpose in UNEX there is a special command SEARCH, which provides two methods. The first one implements a systematic scanning of functional by testing different values of parameters in defined ranges. The syntax of the command is as follows:


Here functional and data are defined exactly in the same manner as for MINIMIZE command. The opening and closing tags otag and ctag are for data field with information on which parameters should be used in scanning procedure. The format of the data field can be best shown by example:

2   1.76   100    1.78
4   0.04   100    0.06

This is definition of a two-dimensional scan. Each line defines a parameter or a group of parameters, which should be scanned. Here the first line is for group number 2. The first parameter in this group should be scanned in range from 1.76 to 1.78 (other parameters in this group will be automatically adjusted using fixed constraints) with 100 steps. In the same manner scanning for the second group (in the example group number 4) is defined. In total, the two-dimensional scan will do 100x100=10000 calculations of functional for different combinations of parameters. After this UNEX reports statistics for parameters:

  • Values of paramaters (first parameters in respective groups) which correspond to minimal value of total functional.

  • Weighted statistics for each parameter:

    • Mean value.

    • Standard deviation.

    • Skewness.

    • Kurtosis (but not excess kurtosis).

  • Minimal tested value.

  • Maximal tested value.

In addition UNEX prints weighted correlations between parameters.

Accuracy of weighted statistics (including correlations) can be sensitive to size of scanned area and to number of tested points. In particular, area in the vicinity of minimum of functional must be sampled dense enough in oder to get well converged values of statistics. Otherwise values of skewness and kurtosis are printed as zeros if they cannot be calculated accurately. The sign for this is a very small value of respective standard deviation. In case of numerical problems with calculation of correlations respective rows and columns and diagonal elements are printed as zeros. Otherwise diagonal elements are exactly 1. In many cases to get reasonable values of statistics at least several tens of thousands points are required. To test for convergence you need to recalculate the values for at least twice as large number of scanned points.

The procedure in SEARCH=SCAN finds global minimum of functional within defined limits for values of parameters and with accuracy determined by scanning step size(s). The problem is, however, that the required number of scanning points scales as SN, where S is the number of steps for each parameter and N is the number of parameters or groups of parameters. Thus, the total number of points increases very quickly with the number of scanning dimensions. To avoid this problem UNEX implements Monte-Carlo method for searching of global minimum of functional. The syntax of the respective command is very similar to that shown above. The only difference is that RAND should be indicated:


The definition of search parameters is also the same as in the example above. For compatibility purposes the integer values (number of steps in case of SCAN) between minimal and maximal allowed parameter values are also indicated but do not play any role and simply ignored by UNEX. In case of RAND the amount of sampled points is controlled by time allowed for SEARCH, see SearchTime keyword.

ED standards

UNEX can process ED intensities of gas standards. In most cases this is done in order to refine electron wavelength. The respective command is STANDARD:


Here method can be SCANLAM, REFINELAM or LSQ. Also there must be defined one or more identificators of intensities, which should be processed. For each intensity the type of standard should be defined with the keyword Std, otherwise default value from the global keyword DefStdType will be used. Also in most cases initial value of electron wavelength (keyword Lam) and distance from nozzle to detector (keyword NtoP) should be defined.

The first method SCANLAM does searching of best electron wavelength by scanning its values. The control keywords for this method are StdScanIter, StdScanLamMin and StdScanLamMax.

The other method REFINELAM searches best electron wavelength using golden section method. In contrast to simple scanning it recalculates background on each iteration, which increases the overall accuracy of the obtained electron wavelength. The most important keywords for this methods are StdRefLamMaxIter and StdRefLamTol.

Note, the type of background for the both methods can be chosen using individual for each intensity curve keyword StdBgl and the type of its approximation with the global keyword GedBglApproxType. The flexibility of the background can be controlled by defining a maximal number of inflection points (or polynomial power) with the keyword Nbgl for each curve individually, or with the global keyword StdDefNbgl. Depending on the type of background scale- or t-factors can be refined if StdBglRefScaleMaxIter is greater than zero.

In case of LSQ least-squares method is used. It refines parameters of total intensities by minimizing the functional

$$  \Phi = \sum_{i} \sum_{j} w_{i,j} \left( I_{i,j}^{model} - I_{i,j}^{exp} \right)^2 + \alpha_{sec} \cdot \sum_{i} w_i \left( S_i^{model} - S_i^{reg} \right)^2 + \alpha_{bgl} \cdot \sum_{i} \sum_{j} \left( \beta_{i,j}^{model} - \beta^{reg} \right)^2 + \alpha_{dbgl} \cdot \sum_{i} \sum_{j} \left( \beta''_{i,j}^{model} \right)^2 \rightarrow min$$

The summation in the first term is performed for all points of all intensity curves processed simultaneously. The second term is for regularization of the refined sector function, if the keyword StdRegSecAlpha is set to non-zero value and a regularizing sector function is defined with the REGSEC command. The third term is for regularization of refined background functions. For this the StdRegBglAlpha keyword must be set to some non-zero value. The regularizing value itself is defined by the keyword StdRegBglValue. The fourth term is for additional control of background flexibility, if the keyword StdRegDBglAlpha is set to non-zero value. In fact this is a sum of second derivatives of backgound of all curves in all points. The used model for total intensity depends on setting of StdIModel keyword for each intensity curve. If it is a1bgl then the model is

$$I^{model} = t \times S \times (I_{mol} + I_{at} + B) = t \times S \times I_{at} \times (M + 1 + \beta)$$

The other option is a2bgl, then the model is

$$I^{model} = t \times S \times (I_{mol} + I_{at}) + B = t \times S \times I_{at} \times (M + 1) + B$$

Here t is the individual factor (usually proportional to exposure time), S is the total sector function (defined as a product of model sector function and reduced sector function), Iat is the atomic scattering intensity, Imol is the molecular scattering intensity, M is the reduced molecular scattering intensity, B is the additive background and stem b0603860fcffe94e5b8eec59ed813421 is the reduced additive background. In the first model background stem b0603860fcffe94e5b8eec59ed813421 is refined, in the second case background B is refined. The reduced sector function is modelled numerically as a set of its values at particular r-values at the sector plane. The particular set of r-values with explicit initial approximation for the reduced sector function can be defined with the SECTOR command. Alternatively UNEX can automatically initialize initial reduced sector function, see keyword StdInitSecStep. Note, in any case a model sector function must be defined, see SecModelType and SecPrm* keywords. Backgrounds stem b0603860fcffe94e5b8eec59ed813421 or B are modelled as Chebyshev polynomials. Order of polynomials can be defined for each curve individually using the Smbp keyword. Normally an initial approximation for the background is obtained by fitting the polynomial to a background, which is obtained by running internally A1BGL or A2BGL procedures. This can be turned off by setting StdInitRefBgl=0. Which types of parameters will be refined is determined by the StdVar* set of keywords.

Refinement of background, sector function and other parameters in STANDARD=LSQ is in no way an automatic method. In many cases this problem is ill-conditioned. Results can depend on initial approximation and on experimental noise in data. Due to this you can often get meaningless results. Normally the data and the problem needs to be deeply investigated for finding optimal settings for this method.

Diffraction intensities of the following molecules can be processed in UNEX as gas standards:

  • Carbon tetrachloride CCl4

  • Benzene C6H6

  • Carbon dioxide CO2

  • Carbon disulfide CS2

Currently used standard values of parameters for these molecules can be printed with the command


It is also possible to define a custom set of standard parameters for each standard molecule with the STDPARAMS command:


Here stdtype is the type of standard, one of the following: CCl4, C6H6, CO2, CS2. In input file between tags otag and ctag must be defined types of terms and their parameters: ra distance, amplitude l and asymetry constant c3. Model molecular intensity functions are calculated from these parameters using equation

$$sM(s) = \sum_{i} k_{i} \times g(s)_{i} \times e^{-\frac{s^2l_{i}^2}{2}} \times \frac {sin \left( sr_{a,(i)} - c_{3,(i)} \frac {s^3}{6} \right) }{r_{a,(i)}}$$

Here summation is performed over ED terms in molecule and ki is the multiplicity factor (number of equal terms of this type in molecule), which is predefined for each type of standard in UNEX. Note, the input order of terms is important and should be as in the examples below.

    C-Cl   1.7667  0.0496  1.95
  Cl..Cl   2.8892  0.0712  0.00
    C-C    1.397760  0.046360  1.950000
   C..C    2.418800  0.055180  0.100000
   C..C    2.792300  0.058980  0.200000
    C-H    1.095600  0.077060  0.330000
   C..H    2.158700  0.099850  0.100000
   C..H    3.404100  0.096880  0.200000
   C..H    3.879200  0.093380  0.300000
   H..H    2.483300  0.157990  0.100000
   H..H    4.300200  0.133170  0.200000
   H..H    4.964400  0.118180  0.300000
    C-O    1.16419  0.0327  3.13
   O..O    2.32427  0.0393  2.95
    C-S    1.559    0.040   2.000000
    S-S    3.112    0.052   0.000000

Values in the examples are only for demonstration of input syntax. Do not use them in real investigations.

Printing of data

Normally UNEX by default prints status of executed commands and some summarized results of these commands. There is, however, a special command PRINT for outputting different kinds of data. This command can be executed at any stage of data processing. The only requirement is that the respective data must be already initialized at the time of requesting printing.

In many cases UNEX prints values of parameters with respective errors from least-squares refinement or other procedures. Some parameters are not directly refined but rather calculated from values of other parameters. Such parameters are called dependent. Standard deviations for dependent parameters are calculated using formula for error propagation

$$s_f = \sqrt{\sum_{i=1}^{N} \left( \frac{\partial f}{\partial p_i} \right)^2 s_i^2 + 2\sum_{i=1}^{N} \sum_{j>i}^{N} \left( \frac{\partial f}{\partial p_i} \right) \rho_{ij} \left( \frac{\partial f}{\partial p_j} \right)}$$

where f is the dependent parameter represented here as a function of independent parameters pi with standard deviations si and covariations ρij, N is the number of groups of parameters. By default UNEX uses covariations if they are available from latest least-squares refinement. This can be turned off with DepSigmaCovar keyword. Standard deviations for independent parameters si are normally those from latest least-squares refinement or Monte-Carlo simulation. However, in some cases they can be defined directly in input file. For example, values of parameters of Z-matrices can be introduced together with respective standard deviations.

Below is the list of data types for printing and corresponding variants of the PRINT command.

  • General information

  • Brief information about hardware and operating system

  • Information about loaded images

  • Data for DISP/ElDiff

    DISP and ElDiff are programs for vibrational spectroscopy and electron diffraction written by Igor Kochikov.


    The first example prints data used as input for calculations in ElDiff using Cartesian coordinate system. The second command prints data for calculations in internal coordinates. Note, to be able to print such data there must be introduced harmonic and optionally cubic force field(s) and Cartesian coordinates for the respective molecule.

  • Molecular symmetry


    This command prints symmetry elements for mol and respective point group. Geometry for mol must be already defined.

  • Rotational constants


    The command prints experimental and model rotational constants for mol. Model values are calculated for the current geometrical structure of mol. Additionally, for each rotational constant respective corrections (defined earlier in the field of the molecule), experimental standard deviations, differences between experimental and model values (taking into account corrections) and errors are printed. The errors are calculated on the basis of standard deviations of refined molecular parameters using error propagation formula. Note, all values are printed only for those rotational constants, for which experimental values were defined. In the end the values of root-mean-square deviation (RMSD) and weighted RMSD (WRMSD, taking into account experimental standard deviations) are calculated and printed.

  • Vibrational force constants


    This three variants print harmonic force constants in Cartesian coordinates for mol. The difference is in the format of printing.


    This is for printing cubic force constants in Cartesian coordinates. The number of columns in each block is controlled by the F3cBlockCols keyword.

  • Geometrical parameters

    Particular geometrical parameters of molecules are printed by calling PRINT command with options DISTANCE (aliases are DIST and BOND), ANGLE (short variant is ANG), TORSION (short variant TORS) and OOP for out-of-plane angles. Syntax of the command includes indication of parameter type, name of molecule and numbers of atoms from two to four, depending on the type of parameter:


    The numeration scheme is as in the image below


    UNEX prints three types of distances, rc, ra and rg. In UNEX output they are indicated as r_c, r_a and r_g, respectively. rc is the geometrically consistent distance as calculated from Cartesian coordinates. In ED structural refinements its definition is closely related to the type of vibrational corrections. If the corrections are (re - ra) then the rc distances are in fact re. In refinements from rotational constants the definition of rc depends on the type of corrections for these constants. If B0 are used without any correction then the refined rc are in fact r0. There can be also other possibilities, depending on details of structural analysis. ra and rg are two kinds of vibrationally averaged distances. The ra is calculated by subtraction respective vibrational correction. The rg type of distance is calculated from ra and respective vibrational amplitude l using approximation

    $$r_g = r_a + \frac{l^2}{r_c}$$

    For all types of geometrical parameters errors are calculated (see explanation above) and printed. By default they correspond to estimated standard deviations, but they also can be modified by a factor defined by PrintEsdFactor keyword.

    There is also a possibility to generate automatically a complete set of internal geometrical parameters and print their values with respective errors. This is done by calling


    In this case UNEX tries first to identify bonds and then to generate all other parameters based on the connectivity information. Two atoms are assumed to be connected with a bond if distance between them is less than sum of their covalent radii [14] plus some fraction of this sum (see GeomBondTol keyword). Out-of-plane angles are generated and printed if their values are below 10 degrees.

  • Z-matrices

    A Z-matrix of a molecule can be printed by calling


    The other option prints only parameters of a Z-matrix

  • Cartesian coordinates

    The most general command for printing Cartesian coordinates of atoms in a molecule is


    The output format of this command is suitable for visualization with UMV program. Two other options MOL and XMOL print Cartesian coordinates in XYZ format [15].


    The difference between MOL and XMOL is that the former does not print dummy atoms.

  • ED scattering factors

    ED scattering factors in form of g-funtions for all types of atomic pairs in a molecule can be printed using the command


    This outputs data, produced by the respective GF command. In the same manner it is also possible to print atomic scattering functions for a specific molecule with the command

  • ED intensity functions

    Different types of electron diffraction intensity and closely related functions can be printed by calling PRINT with one or more arguments from the list below:

    • IR — Distances r (in mm) from center of diffraction pattern to detection points. These data are calculated from respective values of s if electron wavelength and nozzle-to-detector distance are defined.

    • INT — Experimental total intensity.

    • TINT — Theoretical (model) total intensity.

    • RINT — Experimental reduced total intensity, i.e. total intensity divided by t-factor, sector function and atomic component of total intensity.

    • LINT — Levelled experimental total intensity, see below.

    • DINT — Delta (difference) between experimental and theoretical total intensity.

    • SMS — Experimental reduced molecular intensity sM(s).

    • TSMS — Theoretical (model) reduced molecular intensity sM(s).

    • DSMS — Delta (difference) between experimental and theoretical sM(s).

    • BGL — Background intensity. Type of background depends on the last used method for its calculation/estimation.

    • RBGL — Similar to RINT background divided by t-factor, sector function and atomic component of total intensity.

    • LBGL — Levelled background, see below.

    • SEC — Sector function for each data set.

    • IAT — Atomic part of total electron diffraction intensity.

    • INTS — Standard deviations of experimental total intensity.

    • SMSS — Standard deviations of experimental sM(s).

      Note, theoretical (model) functions are (re)calculated before printing.

      In the most complete mode all types of data can be printed by calling


      However, in most cases only several types of data are required for inspection/analysis and thus only particular arguments can be given, for example


      Note, the order of arguments is not important, for example the command below prints the same set of data as in the example above


      By default all defined sets of ED functions are printed. However, it is possible to print only particular sets of data, indicating respective identificators in the PRINT command. The following command prints experimental sM(s) only from the 1-1 data set.


      The levelled versions of total intensity and background, LINT and LBGL, are curves obtained in the following manner. Total intensity function is approximated by a cubic spline (this is default, number of allowed inflection points is defined by LvlInfl keyword) or a polynomial (if keyword LvlPow > 0 is defined). The original total intensity and background are divided by this smooth function and printed. The idea is to output such curves which are easy to assess visually. It is important to use as less inflection points as possible (as low power for polynomial as possible) so that oscillations on the original intensity and background are not influenced. Note, with this requirement splines and polynomials are not always the best approximations, so manual levelling may be required.

      Another possibility for levelled total intensity and background are reduced variants RINT and RBGL. For the description of calculation procedure of these functions see section related to background curves.

  • ED terms of molecules

    Several modes exist for printing parameters of pairs of atoms in molecules. The most general command is


    It prints ra type of distances, vibrational amplitudes and corrections, asymmetry constants for all pairs of atoms. Additionally it prints group numbers for amplitudes and for ra distances. The other variant of the command prints the same information except for group numbers for distances:


    Finally, there is a command, which prints terms sorted by values of ra distances:


    A special possibility exists for printing terms with their contributions to radial distribution functions:


    This command prints data which can be directly plotted. For example, program FurPlot can read and plot such data. Note, the output of this command depends on keywords FurMultR, FurTermDif and FurTermDivAmpl. If FurMultR=1 then the RDFs are approximations of P(r) and the printed distances are of rg type, otherwise RDFs are P(r)/r and the distances are of ra type, respectively. Basic values for contributions of terms are calculated as products of respective atomic charges. After that they are modified depending on settings. If FurMultR=0 then the contributions are divided by respective ra distances. If FurTermDif is active then the obtained values are multiplied by the respective multiplicity factors. In models of mixtures of molecules contributions are also multiplied by respective mole fractions. In case of FurTermDivAmpl=1 the contributions are divided by respective amplitude values.

  • Potential functions

    In dynamic GED models potential energy functions are used. The command to print data on potential function is

  • ED standards

    Parameters of molecules, which can be used in UNEX as GED standards, are printed by

  • Sector functions

    Total and reduced sector functions are printed by


    Regularization sector function can be printed by



  1. D. S. Tikhonov, Y. V. Vishnevskiy, A. N. Rykov, O. E. Grikina, and L. S. Khaikin, “Semi-experimental equilibrium structure of pyrazinamide from gas-phase electron diffraction. How much experimental is it?,” J. Mol. Struct., vol. 1132, pp. 20–27, 2017.

  2. A. W. Ross, M. Fink, R. Hilderbrandt, J. Wang, and V. H. J. Smith, “Complex scattering factors for the diffraction of electrons by gases,” in International Tables for Crystallography Volume C: Mathematical, physical and chemical tables, Third edition., E. Prince, Ed. Dordrecht/Boston/London: Kluwer Academic Publishers, 2004, pp. 262–391.

  3. M. J. Frisch et al., “Gaussian 09, Revision D.01, http://gaussian.com.” .

  4. V. A. Sipachev, “Calculation of shrinkage corrections in harmonic approximation,” J. Mol. Struct.: THEOCHEM, vol. 121, pp. 143–151, 1985.

  5. J. F. Stanton, J. Gauss, L. Cheng, M. E. Harding, D. A. Matthews, and P. G. Szalay, “CFOUR, Coupled-Cluster techniques for Computational Chemistry, a quantum-chemical program package.” .

  6. Y. V. Vishnevskiy, “The Initial Processing of the Gas Electron Diffraction Data: an Improved Method for Obtaining Intensity Curves from Diffraction Patterns,” Journal of Molecular Structure, vol. 833, pp. 30–41, 2007.

  7. K. Levenberg, “A Method for the Solution of Certain Non-Linear Problems in Least Squares,” Quarterly of Applied Mathematics, vol. 2, pp. 164–168, 1944.

  8. D. Marquardt, “An Algorithm for Least-Squares Estimation of Nonlinear Parameters,” SIAM Journal on Applied Mathematics, vol. 11, no. 2, pp. 431–441, 1963.

  9. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, “10.2 Golden Section Search in One Dimension,” in Numerical Recipes 3rd Edition: The Art of Scientific Computing, 3rd ed., New York, NY, USA: Cambridge University Press, 2007.

  10. A. Otlyotov, “Acenaphthene,” pp. in preparation, 2018.

  11. Y. V. Vishnevskiy et al., “Influence of Antipodally Coupled Iodine and Carbon Atoms on the Cage Structure of 9,12-I2-closo-1,2-C2B10H10: An Electron Diffraction and Computational Study,” Inorganic Chemistry, vol. 54, no. 24, pp. 11868–11874, 2015.

  12. A. E. Beaton and J. W. Tukey, “The Fitting of Power Series, Meaning Polynomials, Illustrated on Band-Spectroscopic Data,” Technometrics, vol. 16, no. 2, pp. 147–185, 1974.

  13. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, “15.7.1 Estimation of Parameters by Local M-Estimates,” in Numerical Recipes 3rd Edition: The Art of Scientific Computing, 3rd ed., New York, NY, USA: Cambridge University Press, 2007.

  14. P. Pyykkö and M. Atsumi, “Molecular Single-Bond Covalent Radii for Elements 1–118,” Chemistry – A European Journal, vol. 15, no. 1, pp. 186–197, 2009.

  15. “XYZ file format, https://en.wikipedia.org/wiki/XYZ_file_format.” .