96
H. Elnaggar et al.
be used to perform ligand-field multiplet calculations, and Crispy a graphical user
interface that uses Quanty as a computational engine.
Quanty [9–12] is developed by Maurits Haverkort and his collaborators at the
Institute of Theoretical Physics at Heidelberg University. It is a computational library
that can be used to write quantum mechanical programs in the second quantization
formalism. While the library can be used to describe a wide range of problems,
it is specifically aimed at calculating different spectroscopies, including core level
spectroscopy. Briefly, the user starts by constructing the Hamiltonian for the system
of interest, diagonalize it, selects several eigenstates, and then calculates the spectrum
corresponding to these eigenstates. In Quanty the Hamiltonian is expressed in a basis
of one particle modes, which can be both fermionic and bosonic. The fermionic modes
are usually spin-orbitals. In semi-empirical multiplet calculations, the interactions
between the spin-orbitals are parametrized using values calculated for isolated atoms,
which are afterwards scaled to account for the effect of the surrounding atoms.
Alternatively, the parameters can be calculated directly by using for example DFTbased methods [9]. After the diagonalization of the Hamiltonian and the selection
of the lowest eigenstates, using, for example, Boltzmann statistics, Quanty can be
used to calculate the spectrum. As mentioned previously, this is done using a Green’s
function approach, thereby avoiding the sum-over-states calculation, which can lead
to an important reduction in computational time.
The core of the library is written using the C/C++ programming language for
maximum efficiency. The users do not interact directly with this part of the code,
but rather with the Lua-based layer that wraps it. To run calculations the users are
required to write small programs using the functions defined in Quanty. Doing this
in a scripting language such as Lua has the advantage of providing an ideal environment for experimentation, circumventing the limitations of compiled programming
languages such as C or C++. While this is indeed very helpful, it is not uncommon
for such programs to reach more than a few tens of lines of code, which in itself
can be intimidating for the majority of new users. Also, as it is the case for many
scientific libraries, because of the flexibility given to the users when writing these
programs, it is impossible to check for all the things that might be incorrect. This
leads to errors that are difficult to trace even for experienced users.
To help users to more easily perform Quanty calculations, one of us (M. Retegan) has developed a friendly user interface that exposes the library’s capabilities
for a large part of core level spectroscopies. Crispy [13] was developed using the
Python programming language and relies on additional packages from the Python
ecosystem. The main window of the application is shown in Fig. 4.2. Using Crispy,
the users can quickly adjust the parameters of the calculation, run it, and plot the
resulting spectrum without the need of writing any programs. The approach has many
advantages for novice users, but even experienced ones can use Crispy to generate
a starting program that will become the basis of their calculation. Crispy is a free
and open-source program that can be installed on any operating system that has an
up-to-date Python distribution. For Windows
® and macOS
® the program comes in
easy to install packages that can be downloaded from the official website, http://
www.esrf.eu/computing/scientific/crispy.
Précédent

- 108/219

Suivant