First steps in Yambopy: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
m (Fixed makeup)
Line 39: Line 39:
Solve the problem by running the installation step as
Solve the problem by running the installation step as


<source lang="python">
sudo /your/path/to/python setup.py install
sudo /your/path/to/python setup.py install
</source>
or
or
<source lang="python">
sudo env PATH=$PATH python setup.py install
sudo env PATH=$PATH python setup.py install
</source>


This applies only to the installation step and not to subsequent yambopy use.
This applies only to the installation step and not to subsequent yambopy use.
Line 55: Line 51:
Now yambopy is ready to use! Just go to the tutorials folder and follow the docs!
Now yambopy is ready to use! Just go to the tutorials folder and follow the docs!


<source lang="python">
cd tutorial/bn
cd tutorial/bn
</source>


And go to [[GW tutorial. Convergence and approximations (BN)]] or [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]].
And go to [[GW tutorial. Convergence and approximations (BN)]] or [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]].
Line 67: Line 61:
* Yambopy is already inside the Yambo Quantum Mobile (YQM). Start the YQM and go to the tutorial folder
* Yambopy is already inside the Yambo Quantum Mobile (YQM). Start the YQM and go to the tutorial folder


<source lang="bash">
cd yambopy/
cd yambopy/
</source>


and run  
and run  
<source lang="bash">
git pull
git pull
sudo python3 setup.py install --user
sudo python3 setup.py install --user
</source>


Once the installation finishes, go to [[GW tutorial. Convergence and approximations (BN)]] or [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]].
Once the installation finishes, go to [[GW tutorial. Convergence and approximations (BN)]] or [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]].
Line 84: Line 74:
* Enter in a node and create in the scratch a folder
* Enter in a node and create in the scratch a folder


<source lang="python">
ssh -Y tutoXY@cecam; ssh -Y node0XY
ssh -Y tutoXY@cecam; ssh -Y node0XY
cd /home/scratch
cd /home/scratch
mkdir your_name; cd your_name
mkdir your_name; cd your_name
</source>
-->
-->

Revision as of 11:57, 7 March 2022

A typical yambo calculation proceeds as follows:

  • Obtain the ground state properties from a DFT code (pw.x or abinit) First steps: a walk through from DFT to optical properties
  • Create the yambo netCDF databases using the corresponding interface: (p2y for pw.x or a2y for abinit)
  • Run yambo once to complete the database
  • Run yambo specifying the run-levels to generate the input file
  • Edit the yambo input file
  • Run various yambo simulations
  • Plot the data results

Since many of the parameters of the calculation have to be converged the user might end up running the last three steps many times. This is rather time-consuming without an automatization script.

The yambopy project aims to provide a simple set of python scripts to (i) read and edit yambo and quantum espresso input files, and (ii) to easily perform pre- and post-processing of the simulation data for these two codes. Yambopy was born with the primary objective of making the convergence tests easier.

Installation instructions for general users

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: numpy, scipy, matplotlib, netCDF4, lxml.
  • Go to a directory of your choice and clone yambopy from the git repository
git clone https://github.com/yambo-code/yambopy.git
  • 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

Frequent issues

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

or

sudo env PATH=$PATH python setup.py install

This applies only to the installation step and not to subsequent yambopy use.

Optional

Install abipy [[1]] for band structure interpolations using either pip install abipy or conda install abipy --channel abinit (note that abipy does not work with python >3.6).

Setup complete

Now yambopy is ready to use! Just go to the tutorials folder and follow the docs!

cd tutorial/bn

And go to GW tutorial. Convergence and approximations (BN) or Bethe-Salpeter equation tutorial. Optical absorption (BN).

You can find all the documentation of yambopy here http://yambopy.readthedocs.io/en/latest/index.html

Installation instructions for the hands-on of the 2020 Yambo school at ICTP, Trieste

  • Yambopy is already inside the Yambo Quantum Mobile (YQM). Start the YQM and go to the tutorial folder
cd yambopy/

and run

git pull
sudo python3 setup.py install --user

Once the installation finishes, go to GW tutorial. Convergence and approximations (BN) or Bethe-Salpeter equation tutorial. Optical absorption (BN).

You can find all the documentation of yambopy here http://yambopy.readthedocs.io/en/latest/index.html