README 2.62 KB
Newer Older
Christoph Groth's avatar
Christoph Groth committed
1
2
3
4
5
Welcome to guts, the "Grand Unified Transport System".

Purpose
-------

Anton Akhmerov's avatar
Anton Akhmerov committed
6
guts was used internally in the group of C. W. J. Beenakker in Leiden
7
8
9
10
11
12
13
14
15
16
17
university before the Kwant project was developed. Kwant is superior in most
aspects, however the momentum space discretization code is not contained in
Kwant and still may be useful.

The package was built for internal use, and is currently unmaintained, so use
it with caution.

See LICENSE.rst for the usage conditions and CITING.rst for a recommended
citation.

Below you find the original documentation unmodified.
Christoph Groth's avatar
Christoph Groth committed
18
19
20

Installation
------------
21
22

The only prerequisites are a more or less current versions of python
Christoph Groth's avatar
Christoph Groth committed
23
24
25
26
27
28
29
(http://python.org/) and scipy (http://scipy.org).  We use python 2.4 and 2.5
and scipy 0.7.2.  If the command

python -c 'import scipy'

runs without complaints, everything should be there.

30
31
You can run the tests of guts by executing the command `nosetests' from within
the base directory (this needs the package `python-nose').  It should report no
Christoph Groth's avatar
Christoph Groth committed
32
33
34
failures.


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Usage
-----

The main directory contains several executable files.  Each of these scripts
exposes a part of guts by providing functions.  These are intended to be called
directly by the user by running the script with the python statements to be
executed as arguments.  If the scripts are run without any arguments, help is
displayed.

If the environment variable RNG_SEED is unset or its value is `random' the
random number generator (we use exclusively the one of numpy) is initialized
from `/dev/urandom'.  Otherwise it is initialized from the value of RNG_SEED
which has to be the decimal representation of a 64 bit unsigned integer.
Because the random seed used is always output, runs can be reproduced easily be
setting RNG_SEED.

Some examples:

$ ./izak
$ ./izak 'cond_noise_mass((30,30), [0.1, 0.2, 0.3])'
$ RNG_SEED=123 ./diii 'test((20, 40), 1e-1, 3.14159/2, 0.9)'


Hacking
-------

* Please keep the code consistent by adhering to the already used naming and
  formatting conventions.  We generally follow the "Style Guide for Python
  Code" http://www.python.org/dev/peps/pep-0008/ and the "Docstring
  Conventions" http://www.python.org/dev/peps/pep-0257/

* Write tests for all the important functionality you add.  Be sure not to
  break existing tests.

Christoph Groth's avatar
Christoph Groth committed
69
70
Package structure
-----------------
71

Christoph Groth's avatar
Christoph Groth committed
72
73
guts             -- main directory containing scripts intended for direct usage
guts/guts        -- the guts package
74
guts/guts/models -- models subpackage, containing various models
Christoph Groth's avatar
Christoph Groth committed
75

76
77
78
Every directory which contains .py-files might contains a `tests' subdirectory.
Execute these tests by running the command `nosetests' from the root directory
of guts.