Dysnomia — A Program for MEM analysis from
X-Ray and Neutron Diﬀraction Data
Koichi MOMMA1
National Museum of Nature and Science,
4-1-1 Amakubo, Tsukuba, Ibaraki 305-0005, Japan
Fujio IZUMI2National Institute for Materials Science,
1-2-1 Sengen, Tsukuba, Ibaraki 305-0047, Japan
December 2, 2014

1
2

E-mail: vesta.dev@gmail.com
E-mail: fujioizumi@me.com

Contents
LICENSE AGREEMENT

ii

1 INTRODUCTION

1

2 ALGORITHM
2.1 The Fundamental Principle of MEM . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 F constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 G constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3 Generalized constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4 Linear combination of generalized constraints with weightings . . . . . . .
2.3 Weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Optimization algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1 ZSPA algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.2 Limited-memory BFGS algorithm . . . . . . . . . . . . . . . . . . . . . .
2.4.3 Cambridge algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Fourier transform algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
3
3
3
4
4
5
6
7
7
7
8
9

3 ADJUSTMENT OF STANDARD UNCERTAINTIES
3.1 Powder Diﬀraction Data (*.fos) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Single-Crystal Data (*.mem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10
10
10

4 INSTALLATION AND EXECUTION OF DYSNOMIA
4.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 How to Run Dysnomia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 Interactive data entry followed by MEM analysis . . . . . . . . . . . . . .
4.2.2 Running Dysnomia to input *.prf . . . . . . . . . . . . . . . . . . . . . . .

11
11
11
11
14

5 INPUT AND OUTPUT FILES
5.1 Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15
15
16

i

LICENSE AGREEMENT
Dysnomia LICENSE
Version 1
c 2011–2014, Koichi Momma and Fujio Izumi
Copyright ⃝Dysnomia is distributed free of charge but currently copyrighted with its source code notopen to the public because we wish to control its development and future by ourselves.
Permission to use this software is hereby granted under the following conditions:
1. Whenever original results acquired with Dysnomia are published in journals, proceedings,
and review articles, the program name “Dysnomia” should explicitly be stated, and thefollowing article must be quoted:
K. Momma, T. Ikeda, A. A. Belik and F. Izumi, “Dysnomia, a computer program for
maximum-entropy method (MEM) analysis and its performance in the MEM-based pattern
fitting.” Powder Diﬀr., 28, 184–193 (2013).
Only giving credit to Dysnomia is suﬃce in the cases of abstracts, facility reports, and soforth with limited spaces, for example, as follows:
Electron-density distributions in CaTiO3 were determined by MPF from the
X-ray diﬀraction data with Dysnomia.
2. Dysnomia is provided “as is” without any expressed or implied warranty. We do notprovide any technical support for free.
3. You should not redistribute any copy of the distributed files unless you have a written
permission from us.
If you find a problem or a bug on use of Dysnomia, please let us know and help us improveit.

iiChapter 1

INTRODUCTION
The maximum entropy method (MEM) [1,2] is very useful to modify structural models adopted
in Rietveld analysis and determine distributions of electron and nuclear (coherent-scattering
length, bc ) densities from X-ray and neutron diﬀraction data, respectively [3]. The terminationeﬀect is less serious in MEM analysis than in Fourier/D synthesis because MEM is capable ofestimating structure factors of high-Q reflections that have not been measured experimentally.
In addition, after observed structure factors of overlapped reflections have been estimated on thebasis of results of Rietveld analysis, subsequent MEM analysis more or less improves structure
factors, which makes MEM very eﬀective in the extraction of the maximum amount of structural
information from powder diﬀraction data
Three-dimensional (3D) visualization of electron/nuclear densities resulting from diﬀraction
data achieves a better understanding of the highly disordered structure, chemical bonding (Xray diﬀraction), or anharmonic thermal motion. For example, diﬀusion paths of mobile chemical
species in ionic conductors have been visualized in three dimensions from X-ray and neutron
powder diﬀraction data by a sophisticated structure-refinement technique called MEM-based
pattern fitting (MPF) [3–6]. MPF may be able to reveal even anharmonic thermal vibrations,which are very diﬃcult to analyze from powder diﬀraction data because of many parameters to
be refined by a nonlinear least-squares method.
Dysnomia [6–8] is a MEM analysis program succeeding PRIMA [3, 9] which was put on theInternet in 2003 as part of a 3D visualization system VENUS. It was written from the groundup in the C++ language by introducing advances in MEM analysis from single-crystal andpowder diﬀraction data. Since Dysnomia is the daemon of chaos in the Greek mythology, it
will be suitable for the name of the program for MEM in which the information entropy, S, ismaximized under some constraints.
Dysnomia provides the following features which were not supported in PRIMA:
1. linear combination of generalized F and G constraints,
2. weightings based on lattice-plane spacings.
3. two types of optimization algorithms (a variant of the Cambridge algorithm [10] andthe limited-memory BFGS algorithm [11]) that converge to solutions close to the true
maximum-entropy conditions,
4. automatic selection of fast Fourier transform (FFT) and discrete Fourier transform (DFT),
5. parallel processing using an API (application programming interface), OpenMP, for multiplatform shared-memory parallel programming,

1

Features 1–3 enable us to determine more or less better electron/nuclear densities with Dysnomia
than with PRIMA. Thanks to features 4 and 5, Dysnomia runs faster and requires much lessmemory in large-sized caculations than PRIMA, which makes Dysnomia very suitable for its
execution on standard personal computers equipped with multi-core CPUs.
This document outlines Dysnomia for those who are going to apply MEM to X-ray andneutron diﬀraction data measured by single-crystal and powder diﬀraction methods.

2

Chapter 2

ALGORITHM
2.1

The Fundamental Principle of MEM

The general principle of MEM analysis is to find the maximum of the ingformation entropy,
S, under several constraints by iterative procedures. A few variations of the MEM formalism
have hitherto been adopted in the literature [1, 12, 13]. Here, we will follow the formalism ofCollins [1] based on Jaynes’s expression of S [14].
In MEM analysis from X-ray and neutron diﬀraction data, electron and nuclear densities in
the unit cell are represented by those in voxels (parallelepipeds) whose numbers along a, b, andc axes are Na , Nb , and Nc , respectively; densities within a voxel is regarded as even. Let N (=Na Nb Nc ) be the total number of voxels in the unit cell, ρk the normalized density at position rk
in the 3D gridded space, τk the normalized density derived from prior information for rk , andρ∗k the density at rk . Then, S is computed by
S=−

N
∑

(
ρk ln

k=1

with
ρk =

ρ∗k
.
N
∑
ρ∗k

ρk
τk

)
(2.1)

(2.2)

k=1

S is maximized under constraints C by a method of undetermined Lagrange multipliers,(N)∑ρk − 1 ,(2.3)
Q = S − λC − µk=1

where Q is maximized through iterative computations with respect to ρ and two Lagrange
multipliers, λ and µ.

2.2

Constraints

With Dysnomia, S in Eq. (2.1) is maximized by imposing a linear combination of generalized F
and G constraints.

2.2.1

F constraint

Let NF be the total number of reflections, Fo (hj ) the observed structure factor, F (hj ) the
calculated structure factor, and σ(hj ) the standard uncertainty of |Fo (hj )|. The F constraint3

used in MEM analysis from diﬀraction data is formulated as
CF′ =

NF
∑

|∆Fj |2 − NF ,

(2.4)

j=1

where ∆Fj is the normalized residual for the structure factor:∆Fj =Fo (hj ) − F (hj ).
σ(hj )(2.5)

In the actual implementation of the F constraint in Dysnomia, CF′ is normalized with respect
to NF :
CF

=

CF′
NF

=

F
1 ∑
|∆Fj |2 − 1.
NF

(2.6)
N

(2.7)

j=1

2.2.2

G constraint

Information about overlapped reflections in powder diﬀraction data can be introduced into MEM
analysis through the G constraint [15]:
′
CG

=

NG
∑
Goj − Gj 2

σj

j=1

=

NG
∑

− NG

|∆Gj |2 − NG

(2.8)

j=1

with

L
1/2
j
∑

mi |F (hi )|2 Gj =  i=1 L
 .
j


∑


mi

(2.9)

i=1

In Eqs. (2.8) and (2.9), NG is the total number of groups comprising overlapped reflections, Goj
is the sum of the integrated intensities of overlapped reflections in group j, Lj is the number ofoverlapped reflections in group j, and mi is the multiplicity of reflection i. Combination of CF′′ aﬀords an integrated constraint, C :and CG
2
C2 =

2.2.3

′
CF′ + CG.
NF + NG(2.10)

Generalized constraint

The classical F and G constraints are based on χ2 statistics, whose use assumes that experimental
errors in |Fo (hj )|’s are random with a Gaussian (normal) distribution. Though the use of χ2
constraint is justified by the Gaussian distribution of errors, it is not a suﬃcient condition toensure the Gaussian distribution of residuals between observed and estimated values. In the caseof MEM analysis from diﬀraction data, some low-Q reflections tend to have very large |∆Fj |’s,which leads to a noisy distribution of electron or nuclear densities estimated by MEM. Such a4characteristic in MEM analysis from diﬀraction data was theoretically explained by Jauch [16].
To reduce such an undesirable tendency of MEM, Palatinus and van Smaalen [17] proposed touse higher order moments of ∆Fj as a constraint.
A probability distribution of a random variable x is characterized by the values of its central
moments Mn . For the normalized Gaussian distribution, the central moments are defined as∫ ∞()
Mn (Gauss) =xn (2π)−1/2 exp −x2 /2 dx.
(2.11)−∞The moments of odd n are all zero while those of even n are
M2n (Gauss) =n∏(2i − 1).

(2.12)

i=1

In the case of N samples of the variable x, the central moments Mn can be computed by
1 ∑ n
xi .
N
N

Mn =

(2.13)

i=1

The generalized F constraint of order n is formulated as
CF′ n =

F∑
1|∆Fj |n − NF ,Mn (Gauss)(2.14)

CF n =

CF′ n.
NF(2.15)N

j=1

The classical F constraint corresponds to the generalized constraint of order 2, CF 2 . The classicalG constraint is also generalized as
F∑
1|∆Gj |n − NG .
Mn (Gauss)

N

′
CGn

=

(2.16)

j=1

The generalized F and G constraints of order n, are combined to give a Cn constraint:
Cn =

2.2.4

′
CF′ n + CGn.
NF + NG(2.17)

Linear combination of generalized constraints with weightings

Dysnomia adopts a linear combination of the generalized F and G constraints with relative
weights, λn (n = 2, 4, 6, .....):∑C=
λ n Cn(2.18)
n

with



NF
GF
∑
(
)n ∑
(
)n
1

Cn =
wj |∆Fj | +wj |∆Gj |  − Cwn ,(NF + NG )Mn (Gauss)
j=1(2.19)

j=1

where wj is the weighting factor (see 2.3), and Cwn is the criterion for convergence. When wj
is unity, the ideal constraint is Cwn = 1 for any even n. Such a rigorous constraint seems to behardly satisfied in actual problems. Accordingly, Dysnomia always determines Cwn automatically so as to satisfy Eq. (2.7) or (2.10) on use of the G constraint.
Information about central moments of the normalized residuals, ∆Fj and ∆Gj , is output tofile *.out, for example,

5

C2 =
C4 =
C6 =
C8 =
C10 =
C12 =
C14 =
C16 =

9.9992285E-01
4.0802412E+00
2.8819103E+01
2.0165493E+02
1.2533774E+03
6.8066503E+03
3.2373854E+04
1.3593284E+05

ln(C2 ) =ln(C4 ) =ln(C6 ) =ln(C8 ) =ln(C10) =ln(C12) =ln(C14) =ln(C16) =-0.000077
1.406156
3.361038
5.306558
7.133597
8.825655
10.385106
11.819916

The first column, C2–C16, lists the central moments of order n for |∆Fj |n and |∆Gj |n normalized
by those for Gaussian distribution. The second column, ln(C2)–ln(C16), gives their natural
logarithms.
If the distributions of ∆Fj and ∆Gj are Gaussian, values in the first column are all 1 while
those in the second column are all 0. Normalized central moments larger than 1 imply that
information in observed data is underestimated and not fully reconstructed by MEM. On thecontrary, normalized central moments smaller than 1 imply the overestimation of data, which
result in overfit to observed data.
In MEM analyses from X-ray diﬀraction data with traditional second-order constraints, thenormalized central moments of order n > 2 are typically larger than 1, as shown in the above
example. In such a case, increase λn of order 4 or higher to put restraints on them and bindthem to the ideal value. The central moment of a higher order may be smaller than 1 dependingon the type and quality of data, particularly when NF + NG is relatively small. In such a case,set λn such that λ2 = 1 and λn = 0 for n > 2, which corresponds to the traditional χ2 constraint.
At any rate, be sure to check whether or not 3D distribution of electron/nuclear densities isphysically and chemically reasonable with VESTA [18].

2.3

Weighting

Weighting in the F constraint on the basis of the lattice-plane spacing was first proposed byde Vries et al [19]. Its eﬀectiveness was later confirmed by some other researchers including
Hofmann et al. [20].
Let sj be the reciprocal-lattice vector (= ha∗ + kb∗ + lc∗ ) for reflection j, x the real number
for weighting, and dj the lattice-plane spacing (= 1/|sj |). Then, the weighting factors, wj , in
Eq. (2.19) is given by
[N
]
F
∑
1
1
wj =
|sj |x|si |xi=1(2.20)
[N
]
F
∑
1
1
= x
.
dj
dxi
i=1

If x = 0, no weight is imposed in the same way as with PRIMA [9].
This weighting scheme is suitable for X-ray diﬀraction where parts of low-Q reflections often
have very large ∆Fj values. Values of around 2 are usually recommended in X-ray powder
diﬀraction; x is increased as the quality of intensity data is improved. In the case of singlecrystal X-ray diﬀraction, de Vries et al. [19] empirically found x = 4 to be optimum. On theother hand, this approach is not suited for the analysis of neutron diﬀraction data, where bc
values of constituent elements remain constant regardless Q, particularly those measured at low
temperature. Therefore, x is usually set at 0 in neutron diﬀraction.

6

Ad-hoc weighting described above will be eﬀective, particularly, in MEM analysis from Xray diﬀraction data, where σj (hj )’s tend to be estimated at unreasonably large values for low-Q
reflections.

2.4

Optimization algorithms

The following three types of MEM algorithms are implemented in Dysnomia:
1. 0th-order single pixel approximation (ZSPA) algorithm [21] .
2. Limited-memory Broyden–Fletcher–Goldfarb–Shanno (L-BFGS) algorithm [11].
3. A variant of the Cambridge algorithm [10].
Electron or nuclear densities determined with these algorithms are comparable to each other inmost cases. However, solutions obtained with the ZSPA algorithm do not satisfy true maximumentropy (MaxEnt) conditions whereas the Cambridge algorithm always converges to solutions
close to the true MaxEnt ones [22]. The L-BFGS algorithm, which also converges to true MaxEnt
conditions, is usually faster than our implementation of the Cambridge algorithm in Dysnomia.
Therefore, the Cambridge algorithm in Dysnomia is now regarded as obsolete.

2.4.1

ZSPA algorithm

In the ZSPA algorithm, ρk in the (i + 1)-th iteration is approximated by
(
)
(i)
ρk
∂C
(i+1)
ρk
=
exp −λ · (i)Z∂ρ(2.21)

k

with
Z=

Nv
∑

(
exp −λ ·

k=1

∂C
(i)

)
.

(2.22)∂ρk

If ∆Fj ’s are kept close to Gaussian distribution during MEM iterations, the order of CFn inthe (i)-th iteration is roughly equal to (CF2 )n/2 . Hence, on the substitution of Eq. (2.18) for
C in Eq. (2.21), only the CFn constraint with the highest order takes eﬀect practically at the
beginning of MEM iterations. To overcome such a problem and make results obtained with the
ZSPA algorithm comparable to those with the Cambridge algorithm, λn in Eq. (2.18) in the i-th
iteration is adjusted in such a way as
λ(i)
n =

2.4.2

λn
(CF2 )n/2−1.

(2.23)

Limited-memory BFGS algorithm

The L-BFGS method [11] is a variant of quasi-Newton algorithms, requiring significantly lessmemory than other quasi-Newton methods. Instead of storing a dense n × n approximation (n:the number of variables in the problem) to the inverse Hessian matrix, L-BFGS stores only a
few vectors that represent the approximation implicitly. Let dk = Hk gk be the search direction
at k-th iteration, where Hk is the inverse Hessian matrix of the function, Q(ρ), to be maximized,
gk ≡ ∇Q(ρ) is the gradient of Q, sk = ρk+1 − ρk , yk = gk+1 − gk , and rk = 1/ykT sk . Then, dk iscomputed as follows:7q = gk
For (i = k−1; i >= k−m; i−−){αi = ri sTi q
q = q − αi yi
}
Hk0 =

T s
yk−1
k−1
T y
yk−1
k−1

d = Hk0 q
For (i = k−m; i <= k−1; i++){βi = ri yiT d
d = d + si (αi − βi )}The initial approximate of the inverse Hessian matrix, Hk0 , is represented as a diagonal matrix.
The Lagrange multipliers, λ and µ in Eq. (2.3), cannot be optimized simultaneously with ρ
during the L-BFGS iterations. Then, in the L-BFGS method, λ and µ are gradually changed,
and L-BFGS optimizations are repeated until the two constraints, i.e., Eqs. (2.2) and (2.18),
are fulfilled to achieve convergence. The convergence of the L-BFGS algorithm is judged by
NV
∑

(
ρk

k=1

∂Q
∂ρk

)2
< ε,

(2.24)

where ε is a small threshold value, which is set at 2 × 10−4 by default.

2.4.3

Cambridge algorithm

The Cambridge algorithm adopts local quadratic approximation to Eq. (2.3). For simplicity,
Dysnomia utilizes only the diagonal elements of the Laplacian, ∇2 Q, and approximate Q(ρ+∆ρ)
by
(
)
(
)
∂Q
1 2 ∂2Q
Q(ρ + ∆ρ) = Q(ρ) + ∆ρ
+ ∆ρ.
(2.25)∂ρ2∂ρ2Then, Q can be optimized by(∆ρk = −

∂Q
∂ρk

)( 2
)−1
∂ Q
∂2S
+α· 2
,
∂ρ2k
∂ρk

(2.26)

where α (≥ 0) is the damping factor to ensure that ρ + ∆ρ remains in the trust region of thequadratic approximation [10]. Convergence is judged by comparing the gradient of Eq. (2.3)
with a small threshold value, ε:
)
NV (
1 ∑
∂Q 2
< ε.
(2.27)
Nv∂ρk
k=1

The Cambidge algorithm gives solutions close to the true maximum-entropy (MaxEnt) conditions whereas the ZSPA algorithms aﬀords solutions far from the MaxEnt conditions [22].

8

2.5

Fourier transform algorithms

In MEM analysis, F (hj )’s are calculated by Fourier transform, which is very time-consuming,from electron or nuclear densities, with a result that the CPU time for MEM analysis generally
depends on both N and NF . FFT makes it possible to process huge amounts of data withvery large values of N and NF at high speed. Therefore, Dysnomia benefits MEM analyses ofcrystalline materials with large unit cells and low symmetry. Dysnomia is also very suitable
for analyzing neutron diﬀraction data where nuclear densities tend to be confined in narrower
spaces.
In Dysnomia, FFT is selected if
Na NF nc >

100N
,
ln N

(2.28)

where Na is the total number of voxels in the asymmetric unit, and nc is a factor to be selected
depending on the presence or absence of an inversion center at the origin (centrosymmetric: 1,
noncentrosymmetric: 2).
Parallel computation
For small-scale problems, a DFT routine making full use of multi-threaded parallel processing
with the OpenMP technology is automatically selected to avoid overhead caused by FFT. Thus,in both FFT and DFT, the processing ability of Dysnomia increases in a nearly linear fashion
with increasing number of CPU cores on the use of recent multi-core CPUs.

9

Chapter 3

ADJUSTMENT OF STANDARD
UNCERTAINTIES
3.1

Powder Diﬀraction Data (*.fos)

In powder diﬀraction, σ(hj )’s are estimated on the basis of the law of propagation of errors incombination with counting statistics:|Fo (hj )|σ(hj ) =
2

{[

]2 [
] }1
1
σ(s) 2 2+,
EIo (hj )s(3.1)

where E is the factor to adjust σ(hj ), Io (hj ) is the observed integrated intensity, s is the scale
factor, and σ(s) is the standard uncertainty of s [6]. Both s and σ(s) results from Rietveld
analysis or whole-pattern fitting with RIETAN-FP. E is selected in such a way that electronor nuclear-density distribution which is physically and chemically reasonable results from MEM
analysis. Convenient bash scripts, MPF multi.command, for automatic MPF analyses enable
us to change E as specified in *.prf (see 4.2.2).
In the case of angle-dispersive-type powder diﬀraction where the step width, ∆2θ, is usuallyconstant, E is approximately equal to 1/∆2θ (unit: rad−1 ), which is output as E(SCIO) in *.lst
by RIETAN-FP1 [23]. On the other hand, E depends on the step width, ∆t, of the time-offlight (TOF) in TOF neutron powder diﬀraction; a utility called Alchemy [24, 25] can be used
to convert files output by GSAS and Fullprof into *.fos or *.mem (see 3.2).

3.2

Single-Crystal Data (*.mem)

The estimation of σ(hj ) is diﬃcult even in single-crystal X-ray or neutron diﬀraction; σ(hj )’sare often underestimated or overestimated. With Dysnomia, σ(hj )’s can be changed with theadjustment factor, E, according toσ (hj )σ ′ (hj ) = √(3.2)
E
without any conversion of σ (hj )’s in *.mem.

1

http://fujioizumi.verse.jp/download/download Eng.html

10Chapter 4

INSTALLATION AND
EXECUTION OF DYSNOMIA
4.1

Installation

Dysnomia runs on Windows, OS X, and Linux. For Windows and Linux, both 32 and 64 bit
versions are available for download from the Web site of JP-Minerals.1 URLs of their files are
as follows:
Windows
http://www.geocities.jp/kmo mma/crystal/download/Dysnomia.zip
OS X, 64 bit application
http://www.geocities.jp/kmo mma/crystal/download/Dysnomia.dmg
Linux, 32 bit application
http://www.geocities.jp/kmo mma/crystal/download/Dysnomia-i686.tar.bz2
Linux, 64 bit application
http://www.geocities.jp/kmo mma/crystal/download/Dysnomia-x86 64.tar.bz2
To install Dysnomia for Windows, extract one of the zip files and move the resulting files to
C:\Program Files\RIETAN VENUS\. In the case of OS X, mount Dysnomia.dmg by doubleclicking its icon and move all the files to folder /Applications/RIETAN VENUS/. Both versions
can be run in combination with a shell script, MPF multi.command, written in bash for MPF.
MPF multi.command and its manual are included in distribution files of the RIETAN-FP–
VENUS package.

4.2

How to Run Dysnomia

4.2.1

Interactive data entry followed by MEM analysis

Run Dysnomia by double-clicking its icon or entering the name of its executable binary file in acommand line. Then, the program asks questions that must be answered by the user. In what
follows, these questions are represented by boxed texts with gray background.

1

http://jp-minerals.org

11

# The name of the MEM data set file, *.fos or *.mem.
Type the absolute path of an input file, for example, C:\users\user name\sample\sample.fos(Windows).
# The type of the MEM data set file.
# 0. (a) X-ray diffraction data or (b) neutron diffraction data of a compound#containing no element with a negative bc value.
# 1. Neutron diffraction data of a compound containing at least one element#with a negative bc value.
This option is set for the backward compatibility of input files because the file format of *.mem
is diﬀerent depending on dataset types.
# From which densities will you start?
# 0. Uniform densities.
# 1. Restart from densities recorded in the 3D densities file (*.pgrid).
If you choose the second option, initial densities are input from *.pgrid. This option is usefulwhen you restart MEM analysis after precedent iterations. Note that this option is diﬀerent
from the choice of prior density τk in Eq. (2.1) in strict sense, although on the use of ZSPA
algorithm, use of non-uniform prior is approximated by restarting calculation from τk . For rigorous analyses using non-uniform prior, use L-BFGS or Cambridge algorithms and specify theprior data on the later question. MEM analysis can only be restarted from densities recorded
in *.pgrid output by Dysnomia.
# Optimization algorithm.
# 0. 0th order single-pixel approximation (ZSPA).
# 1. The Limited-memory BFGS algorithm (L-BFGS).
# 2. The Cambridge algorithm (Obsolete).
Read 2.4 for details in the above two algorithms.
# Which initial Lagrangian multiplier will you use (LM_type)?
# 0. The value input by user.
# 1. The value calculated by Dysnomia.
# 2. The value written in the MEM data set file.
This question appears only on use of the ZSPA algorithm, and option 2 appears only when theformat of the MEM dataset file is *.mem.
# The initial Lagrangian multiplier, lambda
This question is asked only when 0 is input in the previous question.
# A parameter x to impose weighting factors on the basis of# lattice-plane spacing.

12Parameter x is included in Eq. (2.20). Input x = 0 in classical MEM analysis where no weightis imposed in the F constraint. If x > 0, it is regarded as x in Eq. (2.20). As described in
2.3, typically x = 0 in neutron diﬀraction, x = 1–2 in X-ray powder diﬀraction, and x = 4 is
optimum in single-crystal X-ray diﬀraction.

# The coefficient, t, to adjust the Lagrangian multiplier.
This question appears only on use of the ZSPA algorithm. Input a value between 0.05 and 0.1
for fast computation. If λ is too large, MEM iterations diverge and never reach the solution. If
λ is too small, the convergence of the MEM equation is ensured whereas the computation time
may increase considerably, with no convergence achieved on specification of a relatively small
maximum number of cycles. The coeﬃcient t allows us to find the best λ value automaticallythrough multiplying λ by 1 + t in every cycle of MEM iterations until λ becomes too large toconverge the MEM equation, which is diﬀerent from the manner of changing λ in PRIMA [9].
# The coefficient, E, to adjust estimated standard uncertainty of# structure factors.
For details in E, see 3.1 and 3.2.
# Will you save a feedback data file?
# 0. Yes (output only individual F data).
# 1. Yes (output all the F data including those for grouped reflections#
and estimated for unobserved reflections).
# 2. No.
In MPF, option 1 is usually selected to include F (hj )’s of high-Q reflections whose profiles are
partly lacking.
# Will you save a e(GAUSS) distribution data file?
# 0. Yes (raw data file, *_eps.raw).
# 1. No.
When option 0 is selected, a text file storing histogram of|Fo (hj )| − |F (hj )|σ(hj )
will be output. See also section 5.2.
# Fractions of lambda for generalized constraints.
# (8 parameters; l_2, l_4, l_6, l_8, l_10, l_12, l_14, l_16)
Eight parameters, λn (n = 2 − 16), for the fractions of generalized constraints with orders of n(see 2.2.4).
# Which prior densities will you use?
# 0. Uniform densities.
# 1. Densities recorded in the 3D densities file (*_prior.pgrid).

13

This option appears only on the use of the L-BFGS and Cambridge algorithm. When option
1 is selected, τk in Eq. (2.1) will be read in from 3D densities file. To use non-uniform priordensities in the ZSPA algorithm, restart the calculation using a 3D data file (*.pgrid) storing
prior densities.
# Will you save a preferences file?
# 0. No.
# 1. Yes (*.prf is output).
If *.prf is output, all the above parameters are stored in it and it can be reused as a template
file for subsequent MEM analyses.
After answering all the questions, the conditions of MEM analysis are displayed in the screen.
Before starting MEM iterations, Dysnomia asks the maximum number of iterations.
# Maximum number of cycles.
The iterations will continue until the convergence is achieved (CONSTR ≤ 1). When the convergence is reached, Dysnomia terminates after outputting CPU times.

4.2.2

Running Dysnomia to input *.prf

If the entire conditions of MEM calculations in filename.prf have already been input by
modifying a template file with a text editor, Dysnomia can be executed in several diﬀerent
ways.
Let the name of *.prf be sample.prf. Then, Dysnomia can be run from the command line bytypingDysnomia sample.prf
to read in sample.prf. When no environment variable PATH is set to a directory under which
the program is placed, type the full path of the program, e.g.,"C:\Program Files\RIETAN VENUS\Dysnomia.exe" sample.prf
if Dysnomia.exe is stored in folder “C:\Program Files\RIETAN VENUS\” on Windows. Of
course, sample.prf has to be placed in the current folder in the above case. A simple batch file
(Windows) or a shell script (OS X or Linux) where such a command is recorded would be moreconvenient.
The most practical and convenient way of carrying out MPF by Dysnomia is the use of
MPF multi.command because E in Eq. (3.1) can be automatically changed during a seriesof MPF analyses. For details in this bash script, read the manuals of MPF multi.command,
MPF multi Win.pdf (Windows) or MPF multi Mac.pdf (OS X), included in a distribution file,
documents.zip.2

2

http://fujioizumi.verse.jp/download/download Eng.html

14Chapter 5

INPUT AND OUTPUT FILES
5.1

Input Files• *.mem: (a) Single-crystal data or (b) powder data where standard uncertainties of observed
structure factors are given.
• *.fos: Powder data compatible with PRIMA [3].
• *.prf: An input file storing all the conditions of MEM calculations. This file keeps backward
compatibility with PRIMA while some new parameters are added for new features inDysnomia.
*.mem and *.fos
A line to give values (POP1, POP2, IPTYP, JPH, JPK, and JPL) related to preferred orientation iscurrently a dummy one. Never analyze powder diﬀraction data where preferred orientation wasobserved.
Grid numbers along a, b, and c axes should be selected in such a way that symmetry elements
such as mirrors, rotation axes, and inversion centers coincide with intersections of grid lines. In
addition, the grid numbers must be appropriately set by considering lattice parameters, a, b,
and c. On the use of FFT, the best performance is achieved when division number along eachaxis is represented as
2p × 3q × 4r × 5s × 7t × 11u × 13v ,where p, q, r, s, t, u, and v are integers equal to or larger than 0. Any other integers are also
allowed; the calculation time is proportional to N log N even for prime numbers of N .
Beware that the sum, T − , of negative bc ’s in the unit cell should be set at 0.0 even if thesample contains no element with a negative bc value, e.g., H, Li, Ti, or Mn.
In a solid solution where two or more elements occupy the same site, a special procedure isrequired for calculating the sum, T + , of positive bc ’s and/or the sum, T − , of negative bc ’s in theunit cell [26]. Suppose a virtual chemical species with an average coherent-scattering length,b̄c , calculated from the occupancies of the constituent elements. Then, add b̄c multiplied by the
number of the virtual chemical species in the unit cell to T + if b̄c > 0 or T − if b̄c < 0.
With Alchemy [24], text files with the following two formats can be obtained from output
files, *.lst, of GSAS:*.fos
Regardless of ID(neg.), both positive and negative values of total scattering amplitudes
are always input. If ID(neg.) = 0, the second amplitude must be 0.0 (dummy).

15

*.mem
If ID(neg.) = 0, only a positive total scattering amplitude is input, followed by λ inthe same line. If ID(neg.) = 1, both positive and negative values of total scattering
amplitudes are input, followed by λ as well.
*.prf
The content of *.prf storing various flags and specifications for MEM analysis is described in
4.2.1, and execution of Dysnomia and the subsequent input of *.prf in 4.2.2.

5.2

Output Files*.out
The standard output file of Dysnomia.
*.pgridThree-dimensional voxel data storing electron or nuclear densities in a binary format. The
content of thiis file can be visualized in three dimensions using VESTA [18] together with acrystal-structure model if necessary. Note that Dysnomia outputs no text files, *.den, storing
3D densities.
*.fba
A list of structure factors calculated by Fourier transform from electron/nuclear densities resulting from MEM analysis. This file is used by RIETAN-FP [27] for whole-pattern fitting in
MPF [3–5].
*.raw
A text file storing histogram of the diﬀerence between the absolute Fo (hj ) and F (hj ) values
divided by the standard uncertainty, σ(hj ), of |Fo (hj )| to give a sample of the random variablewith normalized Gaussian distribution, ϵ(Gauss) [17]:ϵ(Gauss) =|Fo (hj )| − |F (hj )|σ(hj )(j = 1−NF ).

This file is useful for evaluating distribution of errors resulting from MEM analysis.

16

Bibliography[1] D. M. Collins, Nature (London, U. K.), 298, 49 (1982).
[2] M. Sakata and M. Sato, Acta Crystallogr., Sect. A: Found. Crystallogr., 46, 263 (1990).
[3] F. Izumi and R. A. Dilanian, “Recent Research Developments in Physics,” Vol. 3, Part II,
Transworld Research Network, Trivandrum (2002), pp. 699–726.
[4] F. Izumi, S. Kumazawa, T. Ikeda, W.-Z. Hu, A. Yamamoto, and K. Oikawa, Mater. Sci.
Forum, 378–381, 59 (2001).
[5] F. Izumi, Solid State Ionics, 172, 1 (2004).
[6] F. Izumi and K. Momma, IOP Conf. Ser.: Mater. Sci. Eng., 18, 022001 (2011).
[7] K. Momma and F. Izumi, Z. Kristallogr., Proc. 1, 195 (2011).
[8] K. Momma, T. Ikeda, A. A. Belik, and F. Izumi, Powder Diﬀr., 28, 184 (2013).
[9] R. A. Dilanian and F. Izumi, “Super-fast Program, PRIMA, for the Maximum-Entropy
Method,” National Institute for Materials Science, Tsukuba (2010).
[10] S. F. Gull and J. Skilling, “Quantified Maximum Entropy, MemSys5 Users’ Manual,” Maximum Entropy Data Consultants Ltd., Suﬀolk (1999).
[11] J. Nocedal, Math. Comp., 35, 773 (1980).
[12] S. F. Gull and G. J. Daniel, Nature (London, U. K.), 272, 686 (1978).
[13] G. Bricogne, Acta Crystallogr., Sect. A: Found. Crystallogr., 44, 517 (1988).
[14] E. T. Jaynes, Phys. Rev., 106, 620 (1957).
[15] S. Kumazawa, Y. Kubota, M. Takata, M. Sakata, and Y. Ishibashi, J. Appl. Crystallogr.,
26, 453 (1993).
[16] W. Jauch, Acta Crystallogr., Sect. A: Found. Crystallogr., 50, 650 (1994).
[17] L. Palatinus and S. van Smaalen, Acta Crystallogr., Sect. A: Found. Crystallogr., 58, 559(2002).
[18] K. Momma and F. Izumi, J. Appl. Crystallogr., 44, 1272 (2011).
[19] R. Y. de Vries, W. J. Briels, and D. Feil, Acta Crystallogr., Sect. A: Found. Crystallogr.,
50, 383 (1994).

17

[20] A. Hofmann, J. Netzel, and S. van Smaalen, Acta Crystallogr., Sect. B: Struct. Sci., 63,
285 (2007).
[21] S. Kumazawa, M. Takata, and M. Sakata, Acta Crystallogr., Sect. A: Found. Crystallogr.,
51, 47 (1995).
[22] S. van Smaalen, L. Palatinus, and M. Scheider, Acta Crystallogr., Sect. A: Found. Crystallogr., 59, 459 (2003).
[23] F. Izumi, “Multi-Purpose Pattern-Fitting System RIETAN-FP,” National Institute for Materials Science, Tsukuba (2012).
[24] F. Izumi and Y. Kawamura, Bunseki Kagaku, 55, 391 (2006).
[25] Y. Kawamura, K. Momma, and F. Izumi, Hamon, 23, 72 (2013).
[26] R. Ali, M. Yashima, and F. Izumi, Chem. Mater., 19, 3260 (2007).
[27] F. Izumi and K. Momma, Solid State Phenom., 130, 15 (2007).

18