Skip to content

Commit dd4ea8f

Browse files
Update README.md
1 parent b8444c7 commit dd4ea8f

1 file changed

Lines changed: 36 additions & 92 deletions

File tree

‎README.md‎

Lines changed: 36 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -3,148 +3,92 @@
33
Welcome to the CellConstructor python package!
44

55
## What is CellConstructor?
6-
CellConstructor is a python library that allows to easily manipulate crystal structures and phonon dynamical matrices.
7-
It is based on quantum espresso, and wraps in python many of the utilities available in the PHonon package as post-processing tools.
8-
It is also interfaced with ASE for I/O of common file formats (.cif, input of common calculators, etc.) and to SPGLIB for a more stable tool for symmetry identification (also the Quantum Espresso symmetry library is available).
6+
CellConstructor is a Python library that allows for easy manipulation of crystal structures and phonon dynamical matrices.
7+
It is based on Quantum Espresso and wraps many of the utilities available in the Phonon package in Python for post-processing tools.
8+
It is also interfaced with ASE for I/O of standard file formats (.cif, input for common calculators, etc.) and with SPGLIB for a more stable tool for symmetry identification (the Quantum Espresso symmetry library is also available).
99

1010

1111
## What can I do with CellConstructor?
12-
CellConstructor is a general purpouse library. Some of the things you can do with one single command:
12+
CellConstructor is a general-purpose library. Some of the things you can do with one single command:
1313

1414
1. Compute Quasi-Harmonic free energies from a dynamical matrix at any temperature.
1515
2. Impose symmetries on a structure, or on a dynamical matrix.
1616
3. Impose the acoustic sum rule on a dynamical matrix
1717
4. Compute the phonon dispersion along high-symmetry paths
18-
5. Extract harmonic randomly displaced configurations according to the dynamical matrix.
18+
5. Extract harmonic, randomly displaced configurations according to the dynamical matrix.
1919

20-
And also many others cool features!
20+
And also many other cool features!
2121

2222
## Requirements
2323

24-
To correnctly install and use the package, you need to have
25-
1. python >= 2.7
26-
2. ASE : Atomic Simulation Environment (suggested but not mandatory)
24+
To correctly install and use the package, you need to have
25+
1. python >= 3.8
26+
2. ASE: Atomic Simulation Environment (suggested but not mandatory)
2727
3. numpy
2828
4. scipy
29-
5. A fortran compiler
30-
6. Lapack
31-
32-
The fortran compiler is required to compile the fortran libraries
33-
from Quantum ESPRESSO.
29+
5. A FORTRAN compiler
30+
6. Lapack and BLAS
3431

3532
Suggested, but not required, is the installation of ASE and spglib.
3633
The presence of a valid ASE installation will enable some more features,
37-
like the possibility to load structures by any ASE supported file format,
34+
like the possibility to load structures by any ASE-supported file format,
3835
or the possibility to export the structures into a valid ASE Atoms class.
39-
This library is able to compute symmetries from the structure,
40-
and inside the symmetry module there is a convertor to let CellConstructure
41-
dealing with symmetries extracted with spglib.
42-
However, for a more carefull symmetry analisys, we suggest the use of external tools like ISOTROPY.
43-
This package can generate ISOTROPY input files for more advanced symmetry detection.
44-
45-
Please, note that some fortran libraries are needed to be compiled, therefore the Python header files should be localized by the compiling process.
46-
This requires the python distutils and developing tools to be properly installed.
47-
On ubuntu this can be achieved by running:
48-
```bash
49-
sudo apt-get install python-dev
50-
```
5136

52-
If you are using anaconda or pip, it should be automatically installed.
37+
Please note that some Fortran libraries require compilation; therefore, the Python header files should be localized during the compilation process. Starting from version 1.5, the compilation is handled by meson and can be performed automatically using `pip`.
5338

39+
For example, using mamba (or conda), you can install all the binary dependencies with:
5440

55-
## Installation
56-
57-
To install prerequisites you can use the pip installation:
58-
```bash
59-
pip install -r requirements.txt
6041
```
61-
If you are running python2, then ase will fail the installation probably (as it requires python3).
62-
To solve the issue, you can replace the ase line inside requirements.txt with:
63-
ase==3.16.0
64-
This will make it work also with python2.
65-
66-
Be sure you have also python-dev package, otherwise you will experience error while importing Python.h.
67-
Also, you need gfortran and lapack, blas libraries installed.
68-
69-
Once you make sure to have all the required packages installed on your system
70-
and working, just type on the terminal
71-
72-
```bash
73-
python setup.py install
42+
mamba install -c conda-forge python=3.12 ase spglib=2.2 gfortran libblas lapack openmpi openmpi-mpicc pip numpy scipy
7443
```
44+
To use conda, just replace `mamba` with `conda`. Note that `conda` may take a long time to resolve the environment; therefore, mamba or micromamba are recommended.
7545

76-
while you are located in the same directory as the setup.py script is.
46+
## Installation
7747

78-
This program is also distributed upon PyPI. You can install it by typing
48+
The code can be compiled and installed from the PyPi repository with
7949

80-
```bash
50+
```
8151
pip install CellConstructor
8252
```
83-
In this way you will not install the last developing version.
84-
85-
<!--
8653

87-
If the compilation of the modules fails and you are using
88-
an anaconda module on a 64bit machine, you have to install the conda gcc version.
89-
You can do this by typing (on Linux):
54+
Or, alternatively, directly by downloading the GitHub repository and running the following command in the directory containing the code
9055

91-
```bash
92-
conda install gxx_linux-64
9356
```
94-
or (on MacOS):
95-
```bash
96-
conda install clangxx_osx-64
57+
pip install .
9758
```
98-
-->
99-
10059

101-
NOTE:
102-
If you want to install the package into a system python distribution, the
103-
installation commands should be executed as a superuser.
104-
Otherwise, append the --user flag to either the setup.py or the pip installation.
105-
In this way no administrator privileges is required, but the installation will be effective only for the current user.
106-
Note that some python distribution, like anaconda, does not need the superuser, as it has an installation path inside the HOME directory.
60+
This will start the automatic compilation. If some libraries or compilers aren't found, please take a look at the next section.
10761

108-
You can install also using the intel compiler.
109-
In this case, you must edit the setup.py script so that:
110-
- remove the lapack and blas as extra library for the SCHAModules extension.
111-
- add a new flag: 'extra_link_args = ["-mkl"]' to the extension.
62+
To test if the installation runs properly, you can just run the examples reported
63+
in the test directory. The Python code in these tests should be
64+
almost self-explanatory and introduce you to the potential of this library.
11265

113-
Remember to specify the intel compiler both to the compilation and for the running:
114-
CC="icc"
115-
LDSHARED="icc -shared"
116-
otherwise the C module will give an error when loaded reguarding some "_fast_memcpy_" linking.
117-
118-
119-
## GO!
120-
121-
To test if the installation runned properly, run the examples reported
122-
in the test directory. The python code in these tests should be
123-
almost self explaining and introduce you to the potentiality of this library.
124-
125-
Please, note that all the functions of the library have a proper numpy style
66+
Please note that all the functions of the library have a proper numpy style
12667
docstring.
12768

12869
You can test the installation using the script:
12970
```bash
13071
cellconstructor_test.py
13172
```
13273

133-
To run the complete testsuite, you can use the pytest, running the following command:
74+
To run the complete testsuite, you can use pytest, running the following command:
13475
```bash
13576
pytest
13677
```
13778

138-
For a full API documentation, you can compile the documentation inside the UserGuide directory.
139-
To compile it simply use the make utility followed by the frontend.
140-
For example, if you want the html version run:
79+
For a complete API documentation, you can compile the documentation inside the UserGuide directory.
80+
To compile it, use the make utility followed by the frontend.
81+
For example, if you want the HTML version, run:
14182
```bash
14283
make html
14384
```
144-
inside the UserGuide directory. It will generate a build directory that contains the html version of the full documentation.
85+
Inside the UserGuide directory. It will generate a build directory that contains the HTML version of the complete documentation.
14586

14687
## Installation using 'Meson'
14788

89+
Here, we follow the manual step to compile the code using `meson`. These steps are required if you
90+
want to compute the code on an HPC by exploiting the fast optimized libraries of the HPC nodes.
91+
14892
### Compiling with Meson
14993

15094
To compile and install CellConstructor with Meson, follow these typical steps:
@@ -218,8 +162,8 @@ or
218162
sudo meson install
219163
```
220164

221-
You may need superuser privileges (hence `sudo`) to install to system directories.
165+
You may need superuser privileges (hence `sudo`) to install into system directories.
222166

223167
***
224168

225-
Following these steps will help you successfully compile, test, and install SSCHA with Meson as their build system.
169+
Following these steps will help you successfully compile, test, and install SSCHA with Meson as its build system.

0 commit comments

Comments
 (0)