Skip to content

Commit

Permalink
Added compilation instructions and updated API ref
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydumont committed Jul 10, 2014
1 parent 75216a2 commit fd1139e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,28 @@ A C++ ensemble of functions to compute the Wigner 3j- and 6j- symbols. It implem
by Schulten and Gordon. It can either compute an array of Wigner 3j or 6j symbols, or a single
coefficient. It also computes the Clebsch-Gordan coefficients.

## Compilation Instructions
This library uses CMake to help the build process. First, download the source code.
It is recommended to create a separate directory for building, i.e.
```bash
mkdir build/.
```
Then, run
```bash
cmake .. && make && sudo make install.
```
By default, the library is installed to `/usr/lib/` and the include files are in `/usr/include/`.
To install to another directory, say `/usr/local/`, use the command-line argument
```bash
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local && make && sudo make install.
```

## API documentation
We list the user-facing functions that compute the Wigner symbols. The functions are
behind the namespace `WignerSymbols`.

### C++ implementation

+ `std::vector<double> wigner3j(double l2, double l3, double m1, double m2, double m3)`<br />
Computes Wigner 3j symbols with all possible values of `l1`. Returns an `std::vector<double>` with the
coefficients sorted by increasing values of `l1`.
Expand All @@ -22,6 +40,14 @@ behind the namespace `WignerSymbols`.
+ `double wigner6j(double l1, double l2, double l3, double l4, double l5, double l6)`<br />
Computes a specific Wigner 6j symbol.

### Fortran implementation

+ `double wigner3j_f(double l1, double l2, double l3, double m1, double m2, double m3)`<br />
Computes a specific Wigner 3j symbol.
+ `double clebschGordan_f(double l1, double l2, double l3, double m1, double m2, double m3)`<br />
Computes a specific Clebch-Gordan coeffcient.
+ `double wigner6j_f(double l1, double l2, double l3, double l4, double l5, double l6)`<br />
Computes a specific Wigner 6j symbol.

## Bibliography
+ K. Schulten and R. G. Gordon, _Recursive evaluation of 3j and 6j coefficients_, Comput. Phys. Commun. **11**, 269–278 (1976).
Expand Down

0 comments on commit fd1139e

Please sign in to comment.