DFT Calculations Using Quantum ESPRESSO
Set up QE-emacs-modes
QE-emacs-modes is a great open-source set of Emacs major modes that helps with editing Quantum ESPRESSO input files. The package provides features like syntax highlighting, basic auto-indentation and useful commands like creating template input files for various programs.
Install
First, download the package and unzip the downloaded file.
wget http://pwtk.ijs.si/download/QE-modes-7.4.tar.gz
tar -zxvf QE-modes-7.4.tar.gz
Next, run the install.sh file under the unzipped directory. The default install directory is $HOME/.emacs.d/. The installing directory can be changed by specifying prefix=<your_prefered_location> install.sh.
Specify QE-modes in Emacs
To enable QE-modes in Emacs, we need to specify that in the user-init-file of Emacs, which usually lies at $HOME/.emacs. You can simply create one under the same location if you don’t have that file.
Next, you need to copy the content in qe-modes.emacs under the unzipped directory into the .emacs file. If your installation location is default, you are done. Otherwise, you need to specify the installation location at
(add-to-list 'load-path (expand-file-name "/your_path/qe-modes/"))
Useful functionality
File name pattern
QE-modes automatically recognizes any file that ends with .in. It can also be more specific to the different programs included in Quantum ESPRESSO like ph.x, pw.x. Simply name your input files in the format as pw.*.in.
Insert template input file
You can insert a template input file for various QE functions like pw, ph, dynmat. Simply enter M-x prog-insert-template in Emacs.
M-x means pressing the Meta key and ‘x’. On a Mac, the Meta key is usually ESC (press ESC, then ‘x’). prog stands for the input files for various programs like pw, ph, etc.
Enjoy Reading This Article?
Here are some more articles you might like to read next: