First steps in Yambopy
The yambopy project aims to develop python tools to:
- Read and edit yambo and quantum espresso input files
- Easily perform pre- and post-processing of the simulation data for these two codes - including hard-to-get, database-encoded data beyond standard outputs
- Provide easy visualization and plotting options
- Set up simple automatization workflows (e.g., convergence tests)
A quick way to start using Yambopy is described here.
- Make sure that you are using Python 3 and that you have the following python packages:
pyyaml. Optionally, you may want to have abipy [] installed for band structure interpolations.
- Go to a directory of your choice and clone yambopy from the git repository
If you don't want to use git, you may download a tarball from the git repository instead.
- Enter into the yambopy folder and install
cd yambopy sudo python setup.py install
If you don't have administrative privileges (for example on a computing cluster), type instead
cd yambopy python setup.py install --user
When running the installation you may get a
SyntaxError related to utf-8 encoding or it may complain that module
setuptools is not installed even though it is. In this case, it means that the
sudo command is not preserving the correct
PATH for your python executable.
Solve the problem by running the installation step as
sudo /your/path/to/python setup.py install
sudo env PATH=$PATH python setup.py install
This applies only to the installation step and not to subsequent yambopy use.
Installing dependencies with Anaconda
We suggest installing yambopy using Anaconda [] to manage the various python packages.
In this case, you can follow these steps.
First, install the required dependencies:
conda install numpy scipy netcdf4 lxml pyyaml
Then we create a conda environment based on python 3.6 (this is to ensure compatibility with abipy if we want to install it later on):
conda create --name NAME_ENV python=3.6
NAME_ENV as you want, e.g.
Now, we install abipy and its dependency pymatgen using
pip. Here make sure that you are using the
pip version provided by Anaconda and not your system version.
pip install pymatgen pip install abipy
Finally, we are ready to install yambopy:
(or download and extract tarball) and follow the steps outlined in the quick installation section.
Now yambopy is ready to use! Just go to the tutorials folder and follow the docs!
On this wiki, we provide steps for the following tutorials:
- GW tutorial. Convergence and approximations (BN)
- Bethe-Salpeter equation tutorial. Optical absorption (BN)
- Database and plotting tutorial for quantum espresso: qepy (Get the databases: databases_qepy, 59MB)
- Database and plotting tutorial for yambo: yambopy (Get the databases: databases_yambopy, 226MB)
- Phonon-assisted luminescence by finite atomic displacements