Skip to content

Commit c2e18bc

Browse files
Update README.md
More clear installation guide
1 parent 0c845a9 commit c2e18bc

File tree

1 file changed

+37
-39
lines changed

1 file changed

+37
-39
lines changed

README.md

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
11
# SSCHA
22

3-
The stochastic self-consistent harmonic approximation (SSCHA) is a full computational python package that simulates thermodynamic and phononic properties of materials accounting for anharmonicity at a nonperturbative level, fully including quantum and thermal fluctuations.
3+
The stochastic self-consistent harmonic approximation (SSCHA) is a full computational Python package that simulates thermodynamic and phononic properties of materials, accounting for anharmonicity at a nonperturbative level, fully including quantum and thermal fluctuations.
44

55
See more info on the webpage:
66

77
[www.sscha.eu](https://sscha.eu)
88

9-
## Easy installation through Anaconda
10-
11-
The SSCHA code comes as a python library, with computationally intense part speedup with C, Fortran and Julia. The easiest way to install is through Anaconda ([how to install anaconda](https://www.anaconda.com/download))
9+
## Easy installation through Anaconda/Mamba
1210

11+
The SSCHA code is available as a Python library, with computationally intensive parts accelerated using C, Fortran, and Julia.
12+
A quick way to install all the requirements to compile the code in a separate environment is to use `Anaconda`.
13+
Alternatively, when `anaconda` is too slow, we recommend using `mamba` or `micromamba`. Just replace `coda` with `mamba` or `micromamba`, respectively.
1314

1415
```
15-
conda create -n sscha -c conda-forge python=3.12 gfortran=11 libblas lapack openmpi julia openmpi-mpicc pip=23 numpy=1.26 scipy=1.10 spglib=2.2
16+
conda create -n sscha -c conda-forge python=3.12 gfortran libblas lapack openmpi julia openmpi-mpicc pip numpy scipy spglib=2.2
1617
conda activate sscha
1718
pip install ase julia mpi4py
1819
pip install cellconstructor python-sscha tdscha
1920
```
2021

21-
Note, the first time you will startup a sscha calculation, the code will try to download extra packages to setup the python
22-
julia interface. This process may fail if you do not have an internet connection available, or if the julia installation failed.
23-
Note, this is not mandatory, as the code will simply fallback to the old fortran implementation (before 1.4), and continue to run.
24-
25-
If you want the julia speedup, see the section on Manual installation to preconfigure correctly your system.
22+
This is the safest and best way to install the SSCHA. The first line creates a new pristine Python environment with all the required libraries to compile the source code. The second line activates the newly installed environment. Then, the third command installs the additional dependencies, and the last line compiles and installs the SSCHA code.
2623

24+
Note, the first time you start up a sscha calculation, the code will try to download extra packages to set up the python
25+
julia interface. This process may fail if you do not have an internet connection available or if the Julia installation failed.
26+
Note that this is not mandatory, as the code will fall back to the old Fortran implementation (prior to version 1.4) and continue to run.
27+
To achieve the Julia speedup in such a case, please take a look at the section on Manual Installation to preconfigure your system correctly.
2728

2829
## Video lessons from the 2023 School are available
2930

3031
The full recordings, both of theoretical lectures, tutorials and Hands-on sessions can be found
3132
in our youtube channel [SSCHAcode](https://www.youtube.com/@SSCHAcode>)
3233

33-
This is the safest and best way to install the SSCHA. The first line creates a new pristine python environment with all the required libraries to compile the source code. The second line activates the newly installed environment. Then, the thrid command installs the additional dependencies, the last line compiles and install the SSCHA code.
34-
35-
To use the SSCHA, you must activate the python environment with:
34+
To use the SSCHA, you must activate the python environment with (replace `conda` with `mamba` or `micromamba` if you use those environment managers):
3635

3736
```
3837
conda activate sscha
3938
```
4039

41-
This installation method should work also on clusters and with computers with custom configurations. You must remember to activate the ``sscha`` environment even in your submission scripts on clusters.
40+
This installation method should also work on clusters and with computers with custom configurations. You must remember to activate the ``sscha`` environment even in your submission scripts on clusters.
4241

43-
To activate the julia speedup on the SSCHA minimization, you must ensure julia dependencies are correctly setup. To do this, run the following line:
42+
To activate the Julia speedup for SSCHA minimization, ensure that Julia dependencies are correctly set up. To do this, run the following line:
4443

4544
```
4645
python -c 'import julia; julia.install()'
@@ -49,53 +48,53 @@ python -c 'import julia; julia.install()'
4948

5049
## Installing without Anaconda
5150

52-
If you do not have anaconda to handle your dependencies you need to manually compile the code.
51+
If you do not have Anaconda to handle your dependencies, you need to compile the code manually.
5352

54-
Most of the codes require a fortran or C compiler and MPI configured. Here we install all the requirements to properly setup the SSCHA code. To properly compile and install the SSCHA code, you need a fortran compiler and LAPACK/BLAS available.
53+
Most of the codes require a Fortran or C compiler and an MPI configured. Here we install all the requirements to set up the SSCHA code correctly. To properly compile and install the SSCHA code, you need a Fortran compiler and LAPACK/BLAS available.
5554

56-
On Debian-based Linux distribution, all the software required is installed with (Tested on Quantum Mobile and ubuntu 20.04):
55+
On a Debian-based Linux distribution, all the software required is installed with (Tested on Quantum Mobile and Ubuntu 20.04):
5756
```
5857
sudo apt update
5958
sudo apt install libblas-dev liblapack-dev liblapacke-dev gfortran openmpi-bin
6059
```
61-
Note that some of the names of the libraries may change slightly in different linux versions or on MacOS.
60+
Note that some of the names of the libraries may change slightly in different Linux versions or on macOS.
6261

6362
### Python installation
6463

65-
Up to version 1.4 of SSCHA, it supports only python <= 3.10. If you are using the default python in the system, make sure to have installed the development header files. On ubuntu, they can be installed with:
64+
Up to version 1.4 of SSCHA, it supports only Python <= 3.10 and the old setuptools<=64 (we require the deprecated distutils). Starting from version 1.5, we dropped distutils and now support more recent version of python.
65+
If you are using the default Python in the system, make sure to have installed the development header files. On Ubuntu, they can be installed with:
6666

6767
```
6868
sudo apt install python-dev
6969
```
7070

71-
If you use anaconda, they are automatically installed.
71+
If you use anaconda (or mamba/micromamba), they are automatically installed.
7272

7373
### Prerequisites
7474

75-
The SSCHA code is a collection of 3 python packages: CellConstructor, python-sscha and tdscha.
75+
The SSCHA code comprises three Python packages: CellConstructor, python-sscha, and tdscha.
7676

7777
- [CellConstructor](https://github.com/SSCHAcode/CellConstructor>): utility to manage phonon dispersions, atomic structures and crystal symmetries
78-
- [sscha](https://github.com/SSCHAcode/python-sscha>) : This repository, relax with anharmonicity and compute static linear response properties.
78+
- [sscha](https://github.com/SSCHAcode/python-sscha>) : This repository, relax the structure with anharmonicity and computes static linear response properties.
7979
- [tdscha](<https://github.com/SSCHAcode/tdscha>) : Compute the dynamical linear response (Raman and IR, spectral functions)
8080

81-
More details about installations are in the official website [www.sscha.eu](https://sscha.eu/download>)
81+
More details about installations are on the official website [www.sscha.eu](https://sscha.eu/download>)
8282

83-
## Install with Anaconda
83+
## Install with Anaconda/Mamba
8484

85-
86-
The easiest way to install the code is through anaconda.
87-
First make sure you have anaconda installed [(install anaconda)](https://www.anaconda.com/download>)
85+
The easiest way to install the code is through anaconda/mamba.
8886

8987
The following commands are sufficient to install the full sscha suite and its dependencies.
88+
Replace `conda` with `mamba` or `micromamba` if that is the package manager you are using.
9089

9190
```
92-
conda create -n sscha -c conda-forge python=3.12 gfortran=11 libblas lapack openmpi julia openmpi-mpicc pip=23 numpy=1.26 scipy=1.10 spglib=2.2
91+
conda create -n sscha -c conda-forge python=3.12 gfortran libblas lapack openmpi julia openmpi-mpicc pip numpy scipy spglib=2.2
9392
conda activate sscha
9493
pip install ase julia mpi4py
9594
pip install cellconstructor python-sscha tdscha
9695
```
9796

98-
If you get an error of using Julia, try to install julia from the official website and see the passages reported in the Manual installation.
97+
If you happen to get an error when using Julia, please try to install Julia from the official website and see the passages reported in the Manual installation.
9998

10099
To activate the environment and execute the SSCHA, run
101100

@@ -106,17 +105,17 @@ To activate the environment and execute the SSCHA, run
106105

107106
## Manual installation
108107

109-
The SSCHA benefits from julia being installed in the system. If present,
108+
The SSCHA benefits from Julia being installed in the system. If present,
110109
it will be automatically used to speedup the calculation.
111110

112-
To install julia, refer to the official website [julialang.org/downloads/](https://julialang.org/downloads/)
113-
Alternatively, to install julia on linux we can employ juliaup:
111+
To install Julia, refer to the official website [julialang.org/downloads/](https://julialang.org/downloads/)
112+
Alternatively, to install Julia on Linux we can employ JuliaUp:
114113

115114
```
116115
curl -fsSL https://install.julialang.org | sh
117116
```
118117

119-
Hit enter when asked to install julia.
118+
Hit enter when asked to install Julia.
120119

121120
Then, install the python bindings for julia with
122121

@@ -138,13 +137,13 @@ Install the required julia libraries
138137
pkg> add SparseArrays, LinearAlgebra, InteractiveUtils, PyCall
139138
```
140139

141-
This should install the required libraries. Press backspace to return to the standard julia prompt and exit with
140+
This should install the required libraries. Press backspace to return to the standard Julia prompt and exit with
142141

143142
```
144143
julia> exit()
145144
```
146145

147-
Now, you should be able to exploit the julia speedup in the TDSCHA calculations. It is not required to install julia before TDSCHA, it can also be done in a later moment.
146+
Now, you should be able to exploit the Julia speedup in the TDSCHA calculations. It is not required to install Julia before TDSCHA; it can also be done at a later time.
148147

149148

150149
### Compiling SSCHA
@@ -172,16 +171,15 @@ For example
172171
FC=gfortran LDSHARED=gfortran pip install cellconstructor python-sscha
173172
```
174173

175-
176-
For the development version of the code, subtitute the pip call with the python setup.py install.
174+
For the development version of the code.
177175

178176
## Compiling with Meson
179177

180178
To compile and install SSCHA with Meson, follow these typical steps:
181179

182180
### 1. Change to the Source Directory
183181

184-
First, open a terminal and navigate to the root directory of the project source code. This is where the `meson.build` file is located.
182+
First, you can open a terminal and then navigate to the root directory of the project source code. This is where the `meson.build` file is located.
185183

186184
```bash
187185
cd /path/to/source/root/python-sscha

0 commit comments

Comments
 (0)