Skip to content

Commit 9a45e35

Browse files
Merge branch 'master' into fourier_gradient
2 parents 448cd3c + 67214df commit 9a45e35

1 file changed

Lines changed: 81 additions & 33 deletions

File tree

README.rst

Lines changed: 81 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ See more info on the webpage:
66

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

9-
109
## Easy installation through Anaconda
1110

1211
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))
@@ -19,6 +18,12 @@ pip install ase julia mpi4py
1918
pip install cellconstructor python-sscha tdscha
2019
```
2120

21+
Video lessons from the 2023 School are available
22+
=================================================
23+
24+
The full recordings, both of theoretical lectures, tutorials and Hands-on sessions can be found
25+
in our youtube channel `SSCHAcode <https://www.youtube.com/@SSCHAcode>`_
26+
2227
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.
2328

2429
To use the SSCHA, you must activate the python environment with:
@@ -61,66 +66,109 @@ If you use anaconda, they are automatically installed.
6166

6267
### Prerequisites
6368

64-
#### Python libraries
65-
We need to install the prerequisites with pip:
66-
```
67-
pip install ase spglib
68-
```
69+
The SSCHA code is a collection of 3 python packages: CellConstructor, python-sscha and tdscha.
70+
71+
- `CellConstructor <https://github.com/SSCHAcode/CellConstructor>`_ : utility to manage phonon dispersions, atomic structures and crystal symmetries
72+
- `sscha <https://github.com/SSCHAcode/python-sscha>`_ : This repository, relax with anharmonicity and compute static linear response properties.
73+
- `tdscha <https://github.com/SSCHAcode/tdscha>`_ : Compute the dynamical linear response (Raman and IR, spectral functions)
74+
75+
More details about installations are in the official website `www.sscha.eu <https://sscha.eu/download>`_
76+
77+
Install with Anaconda
78+
---------------------
79+
80+
The easiest way to install the code is through anaconda.
81+
First make sure you have anaconda installed `(install anaconda) <https://www.anaconda.com/download>`_
82+
83+
The following commands are sufficient to install the full sscha suite and its dependencies.
84+
85+
.. code:: console
86+
87+
conda create -n sscha -c conda-forge python=3.10 gfortran libblas lapack openmpi julia openmpi-mpicc pip numpy scipy spglib
88+
conda activate sscha
89+
pip install ase julia mpi4py
90+
pip install cellconstructor python-sscha tdscha
91+
92+
To activate the environment and execute the SSCHA, run
93+
94+
.. code:: console
95+
96+
conda activate sscha
97+
98+
99+
Manual installation
100+
-------------------
69101

70-
#### Julia speedup
71102
The SSCHA benefits from julia being installed in the system. If present,
72103
it will be automatically used to speedup the calculation.
73104

74105
To install julia, refer to the official website [julialang.org/downloads/](https://julialang.org/downloads/)
75106
Alternatively, to install julia on linux we can employ juliaup:
76-
```
77-
curl -fsSL https://install.julialang.org | sh
78-
```
107+
108+
.. code:: console
109+
110+
curl -fsSL https://install.julialang.org | sh
111+
79112
Hit enter when asked to install julia.
80113

81114
Then, install the python bindings for julia with
82-
```
83-
pip install julia
84-
```
115+
116+
.. code:: console
117+
118+
pip install julia
85119
86120
87121
The tdscha extension to compute Raman and IR requires some additional julia packages that can be installed within a julia terminal. Update your configuration to have access to the newly installed julia
88-
```
89-
source ~/.bashrc
90-
```
122+
123+
.. code:: console
124+
125+
source ~/.bashrc
126+
91127
Then, open a terminal and type `julia`. Inside the julia prompt, type `]`. The prompt should change color and display the julia version ending with `pkg>`
92128

93129
Install the required julia libraries
94-
```
95-
pkg> add SparseArrays, LinearAlgebra, InteractiveUtils, PyCall
96-
```
130+
131+
.. code:: julia
132+
133+
pkg> add SparseArrays, LinearAlgebra, InteractiveUtils, PyCall
134+
97135
This should install the required libraries. Press backspace to return to the standard julia prompt and exit with
98-
```
99-
julia> exit()
100-
```
136+
137+
.. code:: julia
138+
139+
julia> exit()
140+
101141
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.
102142

103143

104-
### Compiling SSCHA
144+
Compiling SSCHA
145+
~~~~~~~~~~~~~~~
105146

106147
Once the prerequisites have been installed, python-sscha can be downloaded and installed with
107-
```
108-
pip install cellconstructor python-sscha
109-
```
148+
149+
.. code:: console
150+
151+
pip install cellconstructor python-sscha
152+
110153
111154
Alternatively, it is possible to use the most recent version from the [SSCHA GitHub](https://github.com/SSCHAcode) repository, under CellConstructor and python-sscha repositories. The installation is performed in this case with
112155

113-
```
114-
python setup.py install
115-
```
156+
.. code:: console
157+
158+
pip install .
116159
117-
#### Personalize the compiler
160+
161+
Personalize the compiler
162+
~~~~~~~~~~~~~~~~~~~~~~~~
118163

119164
If you have multiple compilers installed, and want to force pip to employ a specific fortran compiler, you can specify its path in the FC environment variable. Remember that the compiler employed to compile the code should match with the linker, indicated in the LDSHARED variable.
120165

121166
For example
122-
```
123-
FC=gfortran LDSHARED=gfortran pip install cellconstructor python-sscha
124-
```
167+
168+
.. code:: console
169+
170+
FC=gfortran LDSHARED=gfortran pip install cellconstructor python-sscha
171+
172+
125173
For the development version of the code, subtitute the pip call with the python setup.py install.
126174

0 commit comments

Comments
 (0)