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.
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, email@example.com). 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, firstname.lastname@example.org
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
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.
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
<my_info> Here goes info/data/etc... </my_info>
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
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
<BASE> Basic info goes here... </BASE>
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:
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
BASE=BASE,<BASE1>,</BASE1> MaxIter is equal here to 20 BASE=BASE,<BASE2>,</BASE2> MaxIter is equal here to 30 STOP <BASE1> MaxIter=20 </BASE1> <BASE2> MaxIter=30 </BASE2>
Below is the list of keywords valid in BASE field:
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:
<BASE> molecules=mol1 </BASE> ; Special field for mol1 <mol1> mol1-related info goes here... </mol1>
Names of image files to be processed. UNEX can handle uncompressed Intel TIFF 8/16-bit grayscale files. As in the case of
moleculesspecial 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
Lambdain 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
MINIMIZEcommand. 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
ROBUSTMcommand. The default value is 10.
Turns on (
=1) or off (
=0, default) printing of functional (hyper)ellipsoid at the end of
Controls whether full table of results is printed (
=1, default) or not (
Turns on (
=1, default) or off (
=0) printing of progress status and speed of
Total allowed time for
SEARCH=RANDcommand in seconds. Default value is 3600.0, i.e. one hour.
Seed (integer number) for random number generator used in
SEARCH=RANDcommand. 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 .
Turns on (
=1) or off (
=0, default) calculations of contributions of different parts of least-squares functional into refined parameters as described in . This is done in the end of
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
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.
=1) or not (
=0, default) randomized values of parameters to output file.
=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
Group number for
RegAlphaparameter in Monte-Carlo simulations.
Maximal and minimal allowed values for
RegAlphaparameter in randomization.
Group number for
RotConstAlphaparameter in Monte-Carlo simulations.
Maximal and minimal allowed values for
RotConstAlphaparameter 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=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%.
Type of static model for calculation of sM(s) function. Available options are
0— standard approximation (default):
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:
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
RESPCALIBprocedure. 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 .
Turn on (
=1) or off (
=0, default) smoothing of reduced (divided by sector function and atomic scattering) multiplicative background in
Maximal number of iterations (0 by default) in refinement of scale factor for sM(s) in
MBGLcommand. For the
A2BGLprocedures 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
MBGLcommand or t-factors of total intensity in the
Minimal allowed difference between s-values. Default value is 1e-7 Å-1.
Type of model for sector function and regularization sector function, respectively. Possible values are
const. For explanation see below section related to introduction of sector functions. Default is
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.
Default type of standard if it is not indicated explicitly in the input of ED intensities. Possible values are
CS2. Default is
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
=1) or disables (
=0, default) printing correlations between refined parameters in
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
A1BGLprocedure 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=LSQbackground if it gets negative. By default this is turned off (
ED Radial distribution functions
Method for calculation of radial distribution curves. There are three options:
classic(this is default) and
modern. For details see description of the
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
FurRtois 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 , 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=GRAPHTERMScommand. 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=GRAPHTERMScommand. 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=INTSCANcommand. 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 (
Print optical density (
=1) or relative electron scattering intensity (
=0, default) in the end of the
Determines whether correlations between refined intensity values should be printed (
=1) or not (
Determines whether correlations between all refined in data reduction parameters should be printed (
=1) or not (
Determines whether histogram of image data used in
IMAGE=INTSCANshould be printed (
=1) or not (
The parameter in the method of Tukeys bisquares weights used for rejection of image data points in the
IMAGE=INTSCANcommand. The default value is 4.685.
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 .
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
Units for geometrical angles on input/output. Possible values are
Potential energy units on input. Possible values are
au— atomic units
kJ— kJ/mol, default
Input units for rotational constants. Possible values are
Mhz— Megahertz, default
Temperature in Kelvins. This parameter affects calculations related to GED with dynamic models and calculations of thermodynamic functions with
CALCTHERMOcommand. 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
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 (
Definition of the system of principal axes of inertia. Possible values are
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
Defines whether standard deviations of Z-matrix parameters should be printed (
=1) or not (
=0, default) by
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=F3CBLOCKScommand. 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>, respectively. For example, for a molecule
mymol the corresponding field is
<mymol> mymol-specific info goes here... </mymol>
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
BASEmolecule 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
dynamic. In case of dynamic model, pseudo-conformers must be defined using
List of pseudo-conformers in the dynamic model of the molecule. Syntax is the same is for
Total number of pseudo-conformers in the dynamic model of the molecule. By default this equals to the number of pseudo-conformers defined using
psconfskeyword. However, additional pseudo-conformers can be automatically generated and populated if
pcnumhas 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 .
Fur2— parametric function .
Spline— cubic spline, this is default.
Gauss— parametric function, sum of gaussians .
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
BASE. Each isotopologue must have its own field just like normal molecules. The
isotopmolsis 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
Images are defined in UNEX similar to molecules — i.e. image file names are listed using
imgfiles keyword in
Accordingly, for each image file can be defined a field with starting and ending tags constructed from the name of this file. For example
<BASE> imgfiles=img1.tif </BASE> ; Special field for img1 <img1.tif> img1-related info goes here... </img1.tif>
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
Ycthese values play role in GED data reduction and can be refined. By default they are equal to
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=sconststep size is in reverse Angstroms, if
IntStepType=rconstthe 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
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=0then 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.
In UNEX geometrical structure of molecules can be defined by means of Z-matrices. For this purpose
ZMATRIX command is used
mol is the name of molecule,
FREEZM is the format and the rest are the tags of the respective field in input file.
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, 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, similar to the type above, internal parameters are bond length, 2nd bond length and an angle.
-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:
Simplest exampleFigure 1. Molecular structure of H2O2.
H 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:
H 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
Rooare in group
1, the angle
Aoohis in group
2and the torsion angle
Fhhis in group
3. The parameters with assigned group numbers can be processed and refined, for example in
Alternative way for definition of third atomFigure 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:
H O 1 Roh H 1 Rhh 2 Ahho Roh=0.960 Rhh=1.663 Ahho=30.0
Definition of third atom by means of two distancesFigure 3. Molecular structure of cyclopropane.
C C 1 Rcc C 1 Rcc 2 Rcc 3 Rcc=1.508
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
3is given in the very end of the corresponding line.
Definition of atoms with distance and two anglesFigure 4. Molecular structure of carbon tetrachloride.
Cl 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
A1variables. This type of definition is indicated with
-1keywords 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
Definition of atoms using two distances and one angleFigure 5. Fragment of a molecule with 5-membered ring.
C 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
2in 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
-2would be symmetrically equivalent to the presented structure.
Definition of atoms using two distances and a torsional angleFigure 6. Fragment of another molecule with 5-membered ring.
C 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
4in the very end of the respective line. There is no
-4type since the geometrical configuration is already defined by the sign of the dihedral angle.
Definition of atoms using three distancesFigure 7. Tetrahedral structure of P4 molecule.
P 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.
Using Cartesian coordinatesFigure 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:
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.
Mixing Cartesian coordinates and internal parametersFigure 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.
Dummy atomsFigure 10. Molecular structure of NH3 with a dummy atom.
X 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 Ahnx=110.0 Dx=120.0
Dummy atoms can be utilized for definition of molecular structure. The
Xsymbol must be used for them. Also note the possibility to apply negative sign to the dihedral angle
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 Rnh=1.1 Ahnx=110.0 Dx=120.0
Here the first defined dummy atom is in fact the 5-th in the list of atoms.
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 Roh=1.0 Ahoh=109.0
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
Rnhhas the value
1.1and standard deviation
0.001, the angle
Ahnxis defined to be
110.0degrees with standard deviation
0.2, while the parameter
Dxis 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.
X 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
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:
mol is the name of molecule,
format must be either
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:
<xyz> 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 </xyz>
Numeration must not be sequentially ordered. The following is also possible:
<xyz> 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 </xyz>
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:
<xyz> Units=Bohr O 0.00000000 0.00000000 0.12236619 H 0.00000000 1.41500832 -0.97102012 H 0.00000000 -1.41500832 -0.97102012 </xyz>
The other possible format is
XYZGAUSSIAN. In can be used for data printed by Gaussian  program, for example
<xyz2> 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 </xyz2>
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:
<xyz2> 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 </xyz2>
Upon reading of data atoms can be automatically renumbered using
RENUM command must be given inside the data field:
<xyz1> RENUM=1-2,2-3,3-1 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 </xyz1>
Here the renumbering works as C1→C2, C2→C3 and C3→C1.
In order to construct a dynamic model for molecular part of electron diffraction intensity a potential function must be introduced.
This can be using
mol is the name of molecule,
format can be
ctag are opening and closing tags of data field as usually.
PTL1 format is for the case when a potential function is introduced in numeric form, for example
POTENTIAL=mol,PTL1,<pot>,</pot> <pot> 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 </pot>
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
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:
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
<pot> POTCOEFG=1-31,2-32,3-33,4-34,5-35,6-36,6-37 POTCOEFV=1-53.0,2--0.3,3-1.0,4-2.0,5--2.8,6-1.0 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 </pot>
Note, this data require the following settings:
PotEUnits=auin BASE field since energies are given in atomic units,
PotType=Gaussin molecular data field as this potential is best described with a sum of two Gaussians,
PotCoefNum=6in molecular data field since two Gaussians require six parameters in total.
POTCOEFG keyword in this example sets group numbers 31—37 for each of the six parameters.
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
Note, in both keywords numeration of parameters starts from 1.
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
POTENTIAL=mol,FUNC,<pot>,</pot> <pot> 1 0.0 2 1.5 101 3 0.2 102 4 0.001 5 0.04 103 </pot>
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
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.
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
The syntax of the command is as usual:
format can be either
An example of data field in
<ampl> ;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 </ampl>
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
<ampl> ;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 </ampl>
If asymmetry parameters are zero, they also can be omitted. Note, group numbers may be defined
<ampl> ;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 </ampl>
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
<ampl> ;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 </ampl>
Another option is to use the
SHRINKU format. It is implemented for reading data produced by Shrink  program.
Specifically UNEX expects data as it is printed by Shrink in tables for second approximation:
<ampl> ;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 </ampl>
From the given data UNEX reads amplitudes and corrections (Shrink prints them in the column
K, they correspond to rh1-ra), the
<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
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.
<ampl> 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 </ampl>
The third available format
ELDIFF is for introducing data produced by ElDiff program.
Here is the shortened example of such data field:
<ampl> ;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 </ampl>
Vibrational corrections are calculated from read data as differences
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),
RENUM command can be used:
<ampl> RENUM=1-2,2-3,3-1 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 </ampl>
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.
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
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.
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
<gtrm> ;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 </gtrm>
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
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
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
Reading of data can be done in three formats,
The first one is the format of archive area in the very end of Gaussian  output files.
Here is an example for water molecule:
F2C=mol,ARCHGAUSSIAN,<data>,</data> <data> 1\1\GINC-CHEOPS10401\Freq\RPBE1PBE\6-31G(d,p)\H2O1\YVISHNEV\04-Nov-201 5\0\\#P PBE1PBE/6-31G(d,p) Freq\\H2O\\0,1\O,0.,0.,0.118417\H,0.,0.7569 23,-0.473669\H,0.,-0.756923,-0.473669\\Version=EM64L-G09RevD.01\State= 1-A1\HF=-76.3369645\RMSD=8.979e-09\RMSF=4.171e-06\ZeroPoint=0.0217171\ Thermal=0.024552\Dipole=0.,0.,-0.8151838\DipoleDeriv=-0.7285751,0.,0., 0.,-0.4461319,0.,0.,0.,-0.3542551,0.3642876,0.,0.,0.,0.223066,0.078652 ,0.,0.1104485,0.1771276,0.3642876,0.,0.,0.,0.223066,-0.078652,0.,-0.11 04485,0.1771276\Polar=3.0234315,0.,7.2833047,0.,0.,5.4419574\PG=C02V [ C2(O1),SGV(H2)]\NImag=0\\-0.00011233,0.,0.69921020,0.,0.,0.47159438,0. 00005616,0.,0.,-0.00006270,0.,-0.34960510,0.20818553,0.,0.38113336,0., 0.27346025,-0.23579719,0.,-0.24082289,0.22485174,0.00005616,0.,0.,0.00 000654,0.,0.,-0.00006270,0.,-0.34960510,-0.20818553,0.,-0.03152826,-0. 03263736,0.,0.38113336,0.,-0.27346025,-0.23579719,0.,0.03263736,0.0109 4545,0.,0.24082289,0.22485174\\0.,0.,-0.00000976,0.,0.00000261,0.00000 488,0.,-0.00000261,0.00000488\\\@ </data>
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
F2C=mol,FREEFC,<data2>,</data2> <data2> -0.00011 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 </data2>
(reduced number of digits is given for compactness) or, for example
F2C=mol,FREEFC,<data3>,</data3> <data3> -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 </data3>
CFOURFCM is used for reading force constants as they are written by Cfour program  in
F2C=mol,CFOURFCM,<data1>,</data1> <data1> 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 </data1>
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
However, in this case the only available format is the
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 ,
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
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.
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.
To introduce total intensity curves
INT command is used:
The simplest example of the data field is
<INT> INT1 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 </INT>
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
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
<INT> INT1 7.4000000000 5.8921150540 7.6000000000 5.6976865331 7.8000000000 5.5221522042 INT1 9.6000000000 4.3235065367 9.8000000000 4.2099473887 10.0000000000 4.1088546902 </INT>
Here the first curve from above is
1-1, the second one gets the code
In the same way a second and so on groups of intensities can be introduced:
<INT> INT1 7.4000000000 5.8921150540 7.6000000000 5.6976865331 7.8000000000 5.5221522042 INT1 9.6000000000 4.3235065367 9.8000000000 4.2099473887 10.0000000000 4.1088546902 INT2 28.1000000000 1.0475326418 28.2000000000 1.0393546185 28.3000000000 1.0276683596 INT2 28.0000000000 1.0475326418 28.2000000000 1.0393546185 28.3000000000 1.0276683596 30.0550000000 1.0159231825 </INT>
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
MinDsare not allowed.
The UNEX input format also allows introducing standard deviations for intensity values:
<INT> INT1 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 </INT>
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:
<INT> INT1 6.2000000000 7.4146108106 6.4000000000 7.1488355268 2.0 6.6000000000 6.8938017418 6.8000000000 6.6412539602 2.0 </INT>
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
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
<INT> INT1 Parameter1=value Parameter2=value 6.2000000000 7.4146108106 6.4000000000 7.1488355268 6.6000000000 6.8938017418 6.8000000000 6.6412539602 </INT>
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
MINIMIZEprocedure. If this parameter equals to a positive integer number then the respective scale factor will be refined. By default
VarScautomatically 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
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
Lamif 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
CO2if the intensity corresponds to one of these compounds and you want to use it for determination of electron wavelength with
Maximal allowed number of inflection points or polynom power for background lines generated in
STANDARDprocedures. By default the value of this keyword is negative, indicating that global setting must be used (see keyword
Group number for electron wavelength in Monte-Carlo procedure
MCMIN. Positive value indicates that electron wavelength will be randomized in
Standard deviation for electron wavelength in Å. It is used for randomization of electron wavelength in
Group number for functional
qused in procedure for approximation of background line with a cubic spline. Positive value indicates that
qwill be randomized in
MCMINand used for recalculation of background.
Minimal value of functional
Maximal value of functional
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
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 (
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=LSQprocedure 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=LSQprocedure. Options are
a2bgl, for details see manual of
Defines type of background used in
STANDARD=REFINELAMprocedures. The available options are
mbgl(multiplicative background, this is default),
a2bgl(respective type of additive background) and
none, which indicates that no background should be calculated.
Reduced molecular intensity sM(s) can also be directly introduced into UNEX using
int is the intensity identificator,
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:
SMS=READ,<sms>,</sms>,1-1 <sms> 6.0000 -1.2163543885 6.2000 -1.0629013696 6.4000 -0.6487354615 6.6000 -0.1055888595 6.8000 0.4035742744 7.0000 0.7359056260 </sms>
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
then the newly introduced data just overwrites old values. Otherwise this data set will be (re)initialized and will contain only sM(s) data.
Multiplicative type of experimental background can be introduced using
int is the intensity identificator,
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:
<bgl> 10.0 0.208101 10.1 0.208028 10.2 0.207974 10.3 0.207913 10.4 0.207872 10.5 0.207835 </bgl>
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:
<bgl> 0.208101 0.208028 0.207974 0.207913 0.207872 0.207835 </bgl>
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.
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
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
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
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
SecModelType=sinpn the model is
SecModelType=const the model is
The parameters A, n and rmax are controlled by the
By default, the model sector function is
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
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
format can be
READTOTAL format is used to input total sector function
SECTOR=READTOTAL,<sec>,</sec> <sec> 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 </sec>
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
SECTOR=READREDUCED,<rsec>,</rsec> <rsec> 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 </rsec>
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
The model for the regularization sector function is controlled by keywords with the
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:
<rsec> 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 </rsec>
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:
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.
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
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
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
ctag are opening and closing tags of a field with supplementary information, for example
WEDGE=MANUAL,wedge.tif,<wed>,</wed> <wed> 0.05 26 128 0.20 86 124 0.33 150 124 </wed>
wedge.tif is processed and the data between
</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:
WEDGE=MANUAL,wedge.tif,<wed>,</wed> <wed> 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 </wed>
Here after Dstd for each area pairs of coordinates X Y are given for
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
After processing the image of calibration target a new image is created and saved under name of original image with added
_proc suffix and
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:
WEDGE=INPUT,<wed>,</wed> <wed> ; 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 </wed>
Here in the first and second columns are given standard and respective scanner values of optical densities.
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.
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.
BASE=BASE,<BASE>,</BASE> IMAGE=SECTOR,Image0005.tif PRINT=SECTOR STOP <BASE> imgfiles=Image0005.tif SecModelType=sinpn SecPrmN=2.0 SecPrmRmax=75.0 SecPrmA=1.412283 </BASE> <Image0005.tif> Xc=2950 Yc=3707 XResolution=1200.0 YResolution=1200.0 IntRfr=2.5 IntRto=75.0 IntStep=0.05 </Image0005.tif>
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  is started by command
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!
Modification of ED intensity
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
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
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
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:
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:
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
or even with two components of the background
Lets assume that the total intensity can be described by the model
This expression can be rewritten as
where M and β are reduced molecular intensity and reduced additive background, respectively:
This can be further modified to
From here an exact expression for the sM function can be easily obtained as
where function Φ is the so called multiplicative background, defined as
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:
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
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
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
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
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
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
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
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
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
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
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.
Averaging of ED data
In UNEX there is a possibility for averaging ED intensity curves with an
The general syntax of the command is as follows:
AVERAGE=itype,int1,int2,...,intn [> oint]
itype is the type of intensity data to be averaged;
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
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
SMSbut 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
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
where is the i-th point of the intensity curve, for which the R-factor is calculated,
is the corresponding point of the averaged intensity with weight ,
N is the total number of intensity points.
Intensity I is the total intensity if
INTS is defined, or sM(s) in case of
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 , which are calculated from respective standard deviations of the averaged curve as .
without weighting, assuming all .
SMS modes standard deviations are not calculated so both types of experimental R-factors are equal.
Weighting works in
INTS modes, when standard deviations for the average curve are calculated.
Next UNEX calculates total experimental R-factor as
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:
where and 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:
Rstr ≫ Rexp, data are reproducible but model cannot describe them; the model should be improved.
Rstr ≪ Rexp, model describes data too well, probably not reproducible data features are fitted; better data are needed.
Rstr ≈ Rexp, 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-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
AVERAGE=INT,1-1,1-2,1-3 > 1-4
Averaging experimental sM(s) curves
2-4. The output data is written to
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
It has exactly the same syntax as the
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
ED radial distribution functions
Radial distribution functions in UNEX are calculated and printed by the
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:
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
FurDampin 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
classicvariant 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
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
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:
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
FurRdrkeyword. 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
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
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.
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.
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.
For graphical interpretation of RDFs it is useful to print also interatomic terms and their contributions with
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
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
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
GEDTERMScommand 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
varxin molecular fields.
Parameters of potential functions in dynamic GED models of molecules.
Scale factors for GED molecular intensity functions, see
VarSckeyword in field of intensity curves.
UNEX provides several refinement procedures.
The most important one is the minimization of least-squares (LS) functional with
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
Here the first, second and third terms correspond to
REGPRM types of functional, respectively. The relative global weight factors and are defined by the keywords
GEDSMS is given, particular ED intensity curves must be provided explicitly for constructing functional, for example
Individual weights for the sM(s) data points are calculated automatically from their standard deviations as .
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
ExpRotC. Their weights are calculated in the same manner as for ED data from respective standard deviations defined with keywords
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:
REGPRM=SIMPLE,<myregparams>,</myregparams> <myregparams> 1 1.49 0.001 2 110.0 0.1 3 0.05 0.01 </myregparams>
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 and . 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:
A particular method to use (or a combination of methods) can be chosen with the
All methods are iterative, the maximal allowed number of iterations is defined by keyword
Iterations stop in several cases:
Relative change in functional is less than threshold value (see keyword
Maximal relative parameter addition is less than threshold value (see keyword
Maximal relative gradient (partial derivative of functional with respect to some refined parameter) is less than threshold value (see keyword
Lambdain Levenberg-Marquardt method increased too many iterations in a row (see keyword
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 , 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
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 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.
wRdare printed in case of using electron diffraction data. The first one is the regular R-factor calculated without weights:
wRd, is a R-factor with diagonal weighting:
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.
wRMSDare printed for rotational constants.
RMSDis the root-mean-square deviation, calculated as
where N is the total number of rotational constants.
wRMSDis the weighted variant of the root-mean-square deviation:
When regularization data are used, the respective part of the total functional (see equation for above) is printed as
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 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
Optional tables with contributions of functionals to refined parameters (see
Matrix of correlations.
Table with correlations above 0.5, if there are any.
Optional table with (hyper)ellipsoid (see
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
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:
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 and 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 ).
There are, however, some heuristic criteria. One of them is implemented in UNEX  (detailed description is given in ).
The respective command is
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
MINIMIZE. The syntax for
ROBUSTM is the same as for
ROBUSTM=functional(s) [data] [groups]
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
The opening and closing tags
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:
<scan> 2 1.76 100 1.78 4 0.04 100 0.06 </scan>
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
(other parameters in this group will be automatically adjusted using fixed constraints) with
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:
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
UNEX can process ED intensities of gas standards. In most cases this is done in order to refine electron wavelength.
The respective command is
method can be
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
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
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
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
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
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
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
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
The other option is
a2bgl, then the model is
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 is the reduced additive background.
In the first model background 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
Alternatively UNEX can automatically initialize initial reduced sector function, see keyword
Note, in any case a model sector function must be defined, see
Backgrounds or B are modelled as Chebyshev polynomials.
Order of polynomials can be defined for each curve individually using the
Normally an initial approximation for the background is obtained by fitting the polynomial to a background, which is obtained by running internally
This can be turned off by setting
Which types of parameters will be refined is determined by the
StdVar* set of keywords.
Refinement of background, sector function and other parameters in
Diffraction intensities of the following molecules can be processed in UNEX as gas standards:
Carbon tetrachloride CCl4
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
stdtype is the type of standard, one of the following:
CS2. In input file between tags
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
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.
STDPARAMS=CCl4,STDTERMS,<ccl4terms>,</ccl4terms> <ccl4terms> C-Cl 1.7667 0.0496 1.95 Cl..Cl 2.8892 0.0712 0.00 </ccl4terms>
STDPARAMS=C6H6,STDTERMS,<c6h6terms>,</c6h6terms> <c6h6terms> 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 </c6h6terms>
STDPARAMS=CO2,STDTERMS,<co2terms>,</co2terms> <co2terms> C-O 1.16419 0.0327 3.13 O..O 2.32427 0.0393 2.95 </co2terms>
STDPARAMS=CS2,STDTERMS,<cs2terms>,</cs2terms> <cs2terms> C-S 1.559 0.040 2.000000 S-S 3.112 0.052 0.000000 </cs2terms>
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
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
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
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
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.
This command prints symmetry elements for
moland respective point group. Geometry for
molmust be already defined.
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
PRINT=F2CMATRIX,mol PRINT=F2CSHRINK,mol PRINT=F2CGAMESS,mol
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
Particular geometrical parameters of molecules are printed by calling
ANGLE(short variant is
OOPfor 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:
PRINT=DISTANCE,mol,1,2 PRINT=ANGLE,mol,1,2,3 PRINT=TORSION,mol,1,2,3,4 PRINT=OOP,mol,1,2,3,4
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_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
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
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  plus some fraction of this sum (see
GeomBondTolkeyword). Out-of-plane angles are generated and printed if their values are below 10 degrees.
A Z-matrix of a molecule can be printed by calling
The other option prints only parameters of a Z-matrix
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
XMOLprint Cartesian coordinates in XYZ format .
The difference between
XMOLis 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
GFcommand. 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
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
RINTbackground 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
The levelled versions of total intensity and background,
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
LvlInflkeyword) 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
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=1then 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=0then the contributions are divided by respective ra distances. If
FurTermDifis 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=1the contributions are divided by respective amplitude values.
In dynamic GED models potential energy functions are used. The command to print data on potential function is
Parameters of molecules, which can be used in UNEX as GED standards, are printed by
Total and reduced sector functions are printed by
Regularization sector function can be printed by
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.
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.
M. J. Frisch et al., “Gaussian 09, Revision D.01, http://gaussian.com.” .
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.
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.
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.
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.
“XYZ file format, https://en.wikipedia.org/wiki/XYZ_file_format.” .