In the directory src/Programs/Spin, you can find a program called SpinChainWithTranslation (if no problem occurs during the compilation process). This program evaluate the eigenvalues of a periodic spin 1 chain with a standard taking. Most of the programs you can find in DiagHam have an help giving you all the option using the usual unix option or . If you run SpinChainWithTranslation --help, you will obtain the following output:
Usage: SpinChainWithTranslation [options] nbr-spin
SpinChainWithTranslation has to be called with at least the parameter nbr-spin. This parameter
can be passed as an argument or using the --nbr-spin option.
Options:
-h, --help : display this help
--nbr-spin : number of spins (default value = 8)
-n, --nbr-eigen : number of eigenvalues (default value = 1)
-S, --SMP : enable SMP mode
--processors : number of processors to use in SMP mode (default value = 2)
For example, if you want to obtain the two lowest eigenvalues for a periodic spin 1 chain with ten spins, you just have to type SpinChainWithTranslation 10 -n 2 or SpinChainWithTranslation 10 --nbr-eigen 2. If you are lucky enough to own a multiprocessors computer, you can use the SMP option.
Once you have run the program, the output looks like this
momentum = 0
Run Lanczos Algorithm
-5.0128255385616 -2.5064127692808 1e-14
...
-12.597050918116 -12.597050918117 1e-14
-14.094129954933 -12.597050918117 3.6663563658368e-15 Nbr of iterations = 40
-14.094129954933 -12.597050918117
momentum = 1
...
The source code of this program, SpinChainWithTranslation.cc, can be found in the same directory. In the following section, we will study this code and show you the structure
the running options
DiagHam provides an easy way to parse command line options. Each option is instanciated from one of the following classes depending on the type of data associated to the option:
BooleanOption
SingleIntegerOption
These classes derived from the AbstractOption.
Last modified: Mon Feb 23 15:23:40 CET 2004