• QUANTUM ESPRESSO with Atomic Simulation Environment (06/19/2013)
    • I love Atomic Simulation Environment (ASE). ASE supports various computational codes. The list of ASE supported calculators are long. However, it does not include any QUANTUM ESPRESSO (QE) calculator /interface /wrapper. I knew that some people are currently devoting their time for building ASE-interfaces for QE (for example qepw class by L. Tornatore, espresso class by Keld et al). In the other hand, a set of QE launchers and input/output parsers in the Python-based QECalc (by Nikolay Markovskiy) was developed few years ago. However, QECalc has no interface with ASE.

      I did not have time to do such great interface. Couple years ago, I wrote my PWscfInput class for preparing inputs for QE runs. This class is very simple: at the beginning, it contained the most frequently used keywords and their default values. Subsequently, I updated new keywords as I needed for my works. This class is very easy to use. The following python script generates input for a relaxation of a 5 layer (1 × 1) Cu(111) slab in a vacuum of 20 Å:

      from ase.lattice.surface import fcc111
      from pwscf import PWscfInput  
      """Generate 5 layer of (1x1) Cu(111) in a 20 angstrom vacuum"""
      system = fcc111('Cu',size=(1,1,5),a=3.60,vacuum=20./2.)
      """ Set pwscf object """
      pwscf = PWscfInput ( system )
      """ Set mass and pseudo potential file for each type """
      pwscf.atomic_species.mass[0] = 63.546 
      pwscf.atomic_species.pseudo_potential[0] = 'Cu.pbe-mt_fhi.UPF' 
      """ Set k-point mesh. Only automatic """
      pwscf.kpoints.nk = [ 15 , 15 , 1]
      """ Write input for pwscf """
      pwscf.write_input ( 'input.inp' )

      If you are interested in this class, you can give it a try. I did not intend to write an universal class for QE input, thus it will not cover all type of calculations. You are free to modify and add more flexibilities (send back to me if you would like to). There could be also some bugs that I did not notice yet, so please carefully check obtained results. Like any other (big or small) freely distributed codes or scripts, there is NO WARRANTY of any form for PWscfInput class and its obtained results.

      Download: PWscfInput class and example

      Tip: Change default values to preferred or frequently used ones.
Department of Physics, University of Central Florida
4111 Libra Drive - Physical Sciences Bldg. 430 - Orlando, FL 32816-2385
Fax: 407-823-5112 Email: duy.le[at]ucf.edu