
ZenGen
I
: a tool to generate ordered configurations for systematic
first-principles calculations,
example of the Cr–Mo–Ni–Re system
J.-C. Crivello
a,∗
, R. Souques
a
, N. Bourgeois
a
, A. Breidi
a
, J.-M. Joubert
a
a
Chimie M´etallurgique des Terres Rares (CMTR), Institut de Chimie et des Mat´eriaux Paris-Est (ICMPE), CNRS
UPEC UMR7182, 2–8 rue Henri Dunant, 94320 Thiais Cedex, France
Abstract
”ZenGen” is a script-tool which helps to automatically generate first-principles input files of all
the ordered compounds of a given crystal structure in a given system. The complete set of heats
of formation of each end-member can then easily be used in the thermodynamic phase modeling.
”ZenGen” is a free and open source code, which can be downloaded from http://zengen.cnrs.fr.
In order to illustrate its possibilities, the quaternary system, Cr–Mo–Ni–Re, has been investigated.
The binary solid solution parameters have been estimated from SQS calculations. The σ−phase
has been considered according to its crystal structure, i.e. with a 5-sublattice model, by the DFT
calculation of the 4
5
= 1024 different ordered quaternary configurations. Several tentative ab initio
phase diagrams are presented.
Keywords: Calphad, DFT, CEF, intermetallic, sigma-phase
I
Fully documented manual and program are available on http://zengen.cnrs.fr.
∗
Corresponding author
Email address: crivello@icmpe.cnrs.fr (J.-C. Crivello)
Preprint submitted to Calphad August 10, 2015

1. Introduction1
The field of thermodynamic modeling has been recently stimulated by the progress of tech-2
niques allowing the calculation of thermodynamic quantities from first-principles calculations,3
such as the Density Functional Theory (DFT) [1]. These methods allow the estimation of forma-4
tion enthalpies of fully ordered compounds, taking into account their crystal structures. These5
calculations can be done not only for stable compounds, but also for metastable ones which6
play an important role in the description of these phases within the Compound Energy Formal-7
ism (CEF) [2, 3]. By using the CEF, any intermetallic phase could be described by a sublattice8
model for which every ordered configuration heat of formation has to be calculated. As an ex-9
ample, a binary phase with five crystal sites, described in a 5-sublattice model generates 2
5
= 3210
different ordered configurations, a ternary 3
5
= 243 ... a huge number, but which can be calculated11
with today’s super-computers.12
Technically, performing calculations on a large number of end-members may cause two types13
of problems: (i) a mistake in the distribution of atoms among all different sites; (ii) a too fast14
relaxation of crystal structure, thus losing the initial symmetry. To avoid these kinds of errors,15
the ”ZenGen” code was created. This code is able to generate all the necessary input files for the16
DFT calculations of the ordered configurations considering a given system. It has been tested on17
several phases, such as Laves phases (C14, C15. . .), or other topologically close packed phases18
(A12, A13, D8
b
, P, δ, . . . ). It can also be used to run Special Quasi-random Structures (SQS)19
calculations [4]. A basic introduction of Zengen workflow is given is section 2.20
Then, in order to illustrate the ZenGen capacity, we have investigated the challenging quater-21
nary Cr–Mo–Ni–Re system. Our aim was not to assess thermodynamically this system, but rather22
to show that systematic DFT calculations can be run contently in this very complex system, that23
they allow the calculation of a preliminary ab initio computed phase diagram, and that they can be24
used as an input for a traditional Calphad assessment . We have demonstrated this approach in our25
previous works [5, 6]. The results are presented in the section 3.26
2

2. The ZenGen workflow27
”ZenGen” is a free and open source code, governed by the CeCILL-B license under French28
law [7], which is officially recognized by Open Source Initiative (OSI). It can be downloaded from29
http://zengen.cnrs.fr. Zengen can be installed on Unix-Linux machines and uses Bash, Perl and30
Python languages. It has been designed to run VASP program [8, 9] for the DFT calculations, but31
could be adapted to other first-principles codes.32
It requires as input the phase ϕ under consideration the crystallographic structure of which33
is constituted by m different sites, and the n different elements. Then, ZenGen decomposes the34
process into four steps:35
1. Automatic generation of the input files for the n
m
ordered configurations;36
2. Setup of the convergence criteria and relaxation steps of the ϕ phase;37
3. Job execution under the same conditions;38
4. Collection of output results (total energy, crystallographic parameters) and generation of a39
TDB file.40
These steps are shown schematically in the diagram of Figure 1 and are more detailed in the41
following paragraphs.42
2.1. Generation of ordered configurations43
After the command:44
$ zengen.pl
the user should enter the name of the crystal structure (X= C14, chi−phase, SQS type. . . ), and45
the name the chemical elements. The cut-off energy is also requested. For structures described by46
more than 2 nonequivalent sites, it is possible to merge sites in order to agree with a simplified sub-47
lattice description. Then, zengen.pl generates all the ordered configurations based on a simple48
algorithm which distributes atoms on all the inequivalent sites. The script separates the systems49
3

Figure 1: Schematic work flow chart of ZenGen.
(unary, binary, ternary...) and sorts the whole configurations by ascending the elemental compo-50
sition. Finally, zengen.pl creates a folder containing all the ordered configurations labeled into51
subfolders (one by configuration), including all the files (POSCAR and POTCAR) needed to perform52
DFT calculations.53
2.2. Setup of calculations54
The calculation is built into 2 interlinked loops: one on the configurations to be calculated, one55
on the relaxation step. The exe-X.sh file has to be modified by the user regarding the particular56
demand: numeration of configuration and relaxation steps to be calculated . See the manual for57
more details.58
4

2.3. Execution of DFT calculations59
After the setup of the exe-X.sh file, its execution can be done in blind process mode by:60
$ nohup ./exe-X.sh &
2.4. Post-treatment61
After the calculations, the post-treatment is made by the command:62
$ ./fin-X.pl
This script generates several files: a summary file sum.out, and a database file: X.TDB. The63
sum.out file contains the total energy, cell parameters, internal positions and magnetic moment of64
every configuration calculated by exe-X.sh. The X.TDB file can be used as an input file for ther-65
modynamic calculation softwares, such as Thermo-Calc [10] or Open-Calphad [11]. It contains,66
for each configuration C in the ϕ phase, the corresponding formation energy, called ∆
f
H
ϕ
(C),67
given in Joule per formula unit, obtained by the difference between the total energies of E
ϕ
(C) and68
those of he weighted pure i elements in their standard element reference state (SER), E
SER
i
:69
∆
f
H
ϕ
(C) = E
ϕ
(C) −
X
i
x
i
· E
SER
i
(1)
The E
SER
i
and E
ϕ
i
(ϕ = A1, A2, A3) have already been calculated with and without spin-polarization.70
They are provided for several cut-off energies (5 sets: 300, 400, 500, 600, and 800 eV) in the folder71
pure of the Zengen installation directory. Figure 2 shows the available i elements of the current72
version.73
A user guide is available on the website http://zengen.cnrs.fr (”Documentation” page), includ-74
ing: the installation procedure, a tutorial, additional explanation, algorithm details, appendices...75
5