In this post, I will show you how can you install the Quantum Espresso package in your Linux system (Ubuntu). I assume you have some prior experience of using a Linux system. In upcoming posts, I will be showing you how you can perform electronic structure calculations using Quantum Espresso. Please do comment and share your suggestions.
Without wasting your time, let’s install Quantum Espresso?
- First thing you need a laptop or a PC with a Linux system (Ubuntu) installed. You also need gfortran program to compile the QE source file.
- To install gfortran run command sudo apt install gfortran in your terminal.
- Download the latest Quantum Espresso source file named qe-6.5-ReleasePack.tgz.
- Extract the downloaded file
- Rename the extracted folder ‘Quantum_Espresso6.5’. Renaming is optional.
- Now, Open the folder ‘Quantum_Espresso6.5’ in the terminal and run the command
./configure && make all
- It will take some time for compilation. After compilation, copy the folder ‘Quantum_Espresso6.5’ to /opt/ directory (note you can keep this folder anywhere you want).
- For this open terminal and run command sudo nautilus . This will open a file browser window. Now, go to the location where you kept the ‘Quantum_Espresso6.5’ folder, copy it, and paste it inside /opt folder. I have posted screenshots of the file manager to show how to find /opt folder. Let the copying of the folder and its content be complete.
- Since you are going to run programs of the QE package from the terminal, you need to tell your terminal where to look for the programs. For this, you need to edit .bashrc file. To open .bashrc file, open the terminal and run the command gedit ~/.bashrc . This will open .bashrc file in gedit program. You can use any other text editor program. Now add the line
to the end of the .bashrc file and save it. Now, you are done installing QE.
- To check whether the installation is successful, open a new terminal and type pw.x, and hit enter. If program pw.x runs then the installation is successful. If ‘Command pw.x not found’ message is displayed, then the problem might be in adding the path in .bashrc file. You should check that again.
I hope you were able to install Quantum Espresso successfully. If you experience any problem please let me know in the comment section.
I hope that you, your family, and friends are doing well in this troubling time.
STAY SAFE, STAY HOME !!!