|
1 | 1 | # Installation |
2 | | -Although you can run *Structure_threader* by simply cloning the repository (or |
| 2 | + |
| 3 | +## Preferred method |
| 4 | + |
| 5 | +Since v0.1.8 *Structure_threader* is available in |
| 6 | +[Pypi](https://pypi.python.org/pypi/structure_threader/0.1.8), which means that |
| 7 | +currently, installing *Structure_threader* is as simple as running |
| 8 | +`pip3 install structure_threader`. Don't forget the `--user` option if you can't |
| 9 | +or don't want to install the program as `root` user. |
| 10 | + |
| 11 | +## Alternative methods |
| 12 | + |
| 13 | +You can also run *Structure_threader* by simply cloning the repository (or |
3 | 14 | downloading one of the releases), and placing the contents of the directory |
4 | | -"structure_threader", $PATH, there is now a better, simpler way. |
5 | | -Since version 0.1.6 `setup.py` is implemented, and therefore all that is |
6 | | -required is running `python3 setup.py install` (or even better, |
7 | | -`pip install .`) from the distribution's root directory (where `setup.py` is |
8 | | -located). |
| 15 | +"structure_threader", on any location on your `$PATH` env var. |
| 16 | + |
| 17 | +Another alternative, that can be used since version 0.1.6 is the `setup.py` |
| 18 | +method. This can be used either by running `python3 setup.py install` (or even |
| 19 | +better, `pip3 install .`) from the distribution's root directory (where |
| 20 | +`setup.py` is located). |
| 21 | + |
9 | 22 | Please note that while dependencies like numpy and matplotlib are handled by |
10 | | -this method, and if using the `pip` method for installing, binary distributions |
11 | | -of STRUCTURE and fastStructure are also installed. |
| 23 | +this method, the preferred method for installing via Pypi will also install |
| 24 | +binary versions of both STRUCTURE and fastStructure for your platform. |
12 | 25 | These binaries are installed in the "standard" `setup.py` |
13 | | -[locations](https://docs.python.org/2/install/), eg. `/usr/bin` is installed |
14 | | -with `sudo` or `~/.local/bin` if installed with the option `--user`, etc... |
15 | | -Regardless, if you wish to compile your own binaries, you may wish to rely on |
16 | | -our |
| 26 | +[locations](https://docs.python.org/2/install/), eg. `/usr/bin/` if installed |
| 27 | +with `sudo` or `~/.local/bin/` if installed with the option `--user`, etc... |
| 28 | + |
| 29 | +If you wish to compile your own binaries for these programs, you may wish to |
| 30 | +rely on our |
17 | 31 | ["helper_scripts"](https://github.com/StuntsPT/Structure_threader/tree/master/helper_scripts) |
18 | 32 | which contain commands to compile and install *Structure* **and** |
19 | | -*fastStructure* (along with any required dependencies). |
20 | | -Since v0.1.8 *Structure_threader* is available in |
21 | | -[Pypi](https://pypi.python.org/pypi/structure_threader/0.1.8), which means that |
22 | | -currently, installing *Structure_threader* is as simple as running |
23 | | -`pip install structure_threader`. Don't forget the `--user` option if you can't |
24 | | -or don't want to install the program as `root` user. |
| 33 | +*fastStructure* (along with any required dependencies). For more details check |
| 34 | +the next few sections. |
25 | 35 |
|
26 | 36 |
|
27 | 37 | ## Structure_threader helper scripts |
| 38 | + |
28 | 39 | The directory "helper_scripts" contains two scripts that will install STRUCTURE and fastStructre, respectively in a *semi* automatic way. |
29 | 40 |
|
30 | 41 | Both scripts default the programs' install locations to ~/Software/<program_name>. You can change this in the scripts themselves should you wish to change this location. |
31 | 42 |
|
32 | 43 |
|
33 | 44 | ### install_structure.sh |
| 45 | + |
34 | 46 | This script will download and install STRUCTURE. |
35 | 47 |
|
36 | 48 |
|
37 | 49 | #### Requirements: |
38 | 50 | * a C compiler, such as GCC, with fortran support. |
39 | 51 | * Cmake is required to build LAPACK |
40 | 52 |
|
41 | | -In every HPC this should be available. |
| 53 | +This should be available in every HPC environment. |
42 | 54 |
|
43 | | -In Ubuntu, all you should need is the package "build-essential" (if it is not already installed for some reason). In other distros, the package name should be similar. It can be installed like this: |
| 55 | +In Ubuntu, all you should need is the package "build-essential" (if it is not |
| 56 | +already installed for some reason). It can be installed like this: |
44 | 57 |
|
45 | 58 | ``` |
46 | 59 | sudo apt-get install build-essential |
47 | 60 | ``` |
48 | 61 |
|
| 62 | +In other distros, the package name should be similar. |
49 | 63 |
|
50 | 64 | ### install_faststructure.sh |
51 | | -This script will download and install faststructure and its dependencies. |
| 65 | +This script will download and install fastStructure and its dependencies. |
52 | 66 |
|
53 | | -Faststructure depends on quite a few software packages: |
| 67 | +fastStructure depends on quite a few software packages: |
54 | 68 | * cython |
55 | 69 | * numpy |
56 | 70 | * scipy |
57 | 71 | * GNU scientific library |
58 | 72 |
|
59 | | -If these are already installed in your system, feel free to comment the script section that will install them. Otherwise it will install a new local copy of these programs. Otherwise, you can install them in Ubuntu with the following command: |
| 73 | +If these are already installed in your system, feel free to comment the script |
| 74 | +section that will install them. Otherwise it will install a new local copy of |
| 75 | +these programs. You can install these packages in Ubuntu with the following |
| 76 | +command: |
60 | 77 |
|
61 | 78 | ``` |
62 | 79 | sudo apt-get install cython python-numpy python-scipy gsl-bin |
63 | 80 | ``` |
64 | 81 |
|
65 | 82 | ###Important note: |
66 | 83 |
|
67 | | -If you are relying on the GNU Scientific Library that was installed using the `install_faststructure` script, you will need to make your system aware of where these libraries are. |
| 84 | +If you are relying on the GNU Scientific Library that was installed using the |
| 85 | +`install_faststructure` script, you will need to make your system aware of |
| 86 | +where these libraries are. |
68 | 87 | for that, add the following to your `~/.bashrc`: |
69 | 88 |
|
70 | 89 | ```bash |
71 | 90 | LD_LIBRARY_PATH=$install_dir/lib |
72 | 91 | export LD_LIBRARY_PATH |
73 | 92 | ``` |
74 | 93 |
|
75 | | -Where `$install_dir` is the directory defined in `install_faststructure`. |
| 94 | +Where `$install_dir` is the directory defined in `install_faststructure.sh`. |
0 commit comments