Alessandro MIRONE

Amarcord is a suite of programs to calculate absortpion spectra and fluorescence  in the framework of the Theo Thole  model.
The physical approximation are the same as in the Theo Thole works.
On the other hand the numerical implementation has been done without using group theory  and  the Hamiltonian  is directly diagonalized without preliminary decompositions.
It means that the resulting program is more expensive in CPU time, on one hand, but it is on the other hand  much easier to use.

The principle of Amarcord is explained on  Alessandro Mirone, Maurizio Sacchi, Susanna  Gota : PRB , Vol 61, No 20, page 13540


You can get the sources and download the codes, however if you have a good bandwidth and a Linux machine with relatively recent libraries, you'll be able to run a precompiled version that I have prepared for you. In this case download esrf_sw.tar.gz :. It is a big file that contains a stand alone directory with all the libraries that you need, even gcc, lapack .... so that regardeless of the installation you have ( Suse, Debian, Slackware, RedHat..) you should be able to run the codes without any additional effort. Go as root in the directory /opt and untar the archive. You will get the directory /opt/ESRF_sw containing a bin and a lib directory. There are also sources and examples in separate directory. Normally this directory is transparent to your system, so that if you want to use the binaries you uset the commands ( bash ) export PATH=/opt/ESRF_sw/bin:$PATH ..... and export LD_LIBRARY_PATH=/opt/ESRF_sw/lib:$LD_LIBRARY_PATH ...... and you are ready to tun the programs. If you want to recompile the source into ESRF_sw read the notice. If You want to download just the sources : download :.


What's that??

You  can use  the programs contained in the amarcord packages as black boxes, but if you wonder what all those files are, I will explain that for you personal information :
blas and lapack are the very famous linear algebra packages from  Your system might already have them, in this case it is not necessary to download these two packages.
nMatrix is a C++ packages that specifies a matrix class to be used  as a front-end to lapack.  It is a package originally written by Dave Weber, The original  package was called uMatrix. I did some modification because uMatrix stored matrices line by line and I wanted to have  them stored columns by colum in order to be faster to manipulate eigenvector that are given column by column. by certain routines... But do not worry : you do not need to know all these details...
Sparsa is  a c++ package that I have written to manipulate, invert and diagonalise sparse matrice. It  implements conjugate gradient method for matrix inversion and the  Lanczos method with thick restart for the diagonalization.  I followed the paper by Kesheng Wu and Horst Simon
Amarcord  finally, is the packages containing several programs whose utilisation is explained in the section Examples.

How do I install all the packages??

You need a c++ and a fortran compiler.
dezip and detar the archives. Then for each packages in ( blas-1.0,  lapack-1.0, nMatrix-1.1, Sparsa-1.1, amarcordSparsa-1.1 ) cd to the directory package and :

su to root
make install

This is the normal procedure to install everything in /usr/local

If you want to do a personal installation in your home directory, you can pass the right prefix to ./configure. For example supposing that you live in /home/alex like me , and  using bash

export CPPFLAGS=-I/home/alex/include
export  LDFLAGS =-L/home/alex/lib
mkdir  /home/alex/lib /home/alex/include /home/alex/bin

Then for each package

cd to the package directory

./configure --prefix=/home/alex
make install

Then all the programs  are available if /home/alex/bin is in the PATH and if you configure LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/alex/lib


I provide you with two examples:
one  for the calculation of absorption profiles  AmarcordExample1.tar.gz  and another for fluorescence that will be available on your demand.
You can run the example following the INSTRUCTIONS


If you want to calculate medium values of operators such as Mz or Sz (angular or spin momentum projection along the quantization axis) - which
can be useful for example when sum rules fail - you need to use the ancillary programs componiatomiS and estraiasfhfsS which are automatically
installed with the package. You can find here some very simple instructions how to use these programs.


The form of the 5X5 matrix describing the interaction of the neighbooring atoms on a d shell is well known in many cases like cubic symmetry.
However if you need this matrix for non usual geometries I provide you with this utility to build up the cristalline potential matrix for arbitrary geometry, as described in my paper.
To you use it you will have to change four lines in the code ( yes, it is very primitive) where the neighbooring atoms position are given, recompile following the usual .configure, make path
and finally run the program. You can read how to use the program in this README