The QEpyCalculator object

The QEpyCalculator object is a calculator for ASE:

from qepy.calculator import QEpyCalculator
driver = QEpyCalculator(inputfile='qe_in.in')

Note

The units of ASE Calculator is different from qepy.driver.Driver object.

List of all Methods

class qepy.calculator.QEpyCalculator(atoms=None, inputfile=None, from_file=False, wrap=False, extrapolation=True, ase_espresso=None, qe_options=None, comm=None, ldescf=False, iterative=False, task='scf', embed=None, prefix=None, outdir=None, logfile=None, **kwargs)[source]

QEpy Calculator for ASE.

QEpy initialization depends on the input file. Here are some ways to generate input file :

  • Give a file inputfile or/and a dict qe_options will generate a temporary input file with new atomic information.

  • Give input file name inputfile and from_file = True will read the structures to atoms (ase.Atoms) from inputfile and initialize the QEpy with inputfile.

  • Give dict ase_espresso will generate a temporary input file with ase.io.espresso.write_espresso_in (Only works for program PW).

Parameters
  • atoms (ase.Atoms) -- ASE atoms object

  • inputfile (str) -- Name of QE input file

  • from_file (str) -- Read the structure from inputfile, and use the inputfile for the QE Initialization.

  • wrap (bool) -- If True, wrap the atoms back to cell before update the ions.

  • extrapolation (str or bool) -- If False, every step will re-run the QE from file.

  • ase_espresso (dict) -- A dictionary with some parameters to generate PW input.

  • qe_options (dict) -- A dictionary with input parameters for QE to generate QE input file.

  • comm (object) -- Parallel communicator

  • ldescf (bool) -- If True, also print the scf correction term in the iteratively mode

  • iterative (bool) -- Iteratively run the scf or tddft

  • task (str) --

    Task of the driver :

    • 'scf' : scf task

    • 'optical' : Optical absorption spectrum (TDDFT)

    • 'nscf' : read file from scf

  • embed (object (Fortran)) -- embed object for QE

  • prefix (str) -- prefix of QE input/output

  • outdir (str) -- The output directory of QE

  • logfile (str, file or bool) --

    The screen output of QE. If it is a file descriptor, it should open with 'w+'.

Note

  • The bool gather parameter in functions means the data is gathered in root or distributed in all cpus.

  • if inputfile is not None. The ase_espresso should be set. Which contains :

    • input_data: dict

    • pseudopotentials: dict

    • kpts: (int, int, int) or dict

    • koffset: (int, int, int)

    • crystal_coordinates: bool

    More details, see ase.io.espresso.write_espresso_in.

static get_atoms_from_qepy()[source]

Return the atom.Atoms from QE.

get_bz_k_points()[source]

See qepy.driver.Driver.get_bz_k_points()

get_density(gather=True)[source]

See qepy.driver.Driver.get_density()

get_effective_potential(spin=0, pad=True)[source]

See qepy.driver.Driver.get_effective_potential()

get_eigenvalues(kpt=0, spin=0)[source]

See qepy.driver.Driver.get_eigenvalues()

get_fermi_level()[source]

See qepy.driver.Driver.get_fermi_level()

get_forces(atoms=None, icalc=0)[source]

See qepy.driver.Driver.get_forces()

get_ibz_k_points()[source]

See qepy.driver.Driver.get_ibz_k_points()

get_k_point_weights()[source]

See qepy.driver.Driver.get_k_point_weights()

get_magnetic_moment(atoms=None)[source]

See qepy.driver.Driver.get_magnetic_moment()

get_number_of_bands()[source]

See qepy.driver.Driver.get_number_of_bands()

get_number_of_grid_points(gather=True)[source]

See qepy.driver.Driver.get_number_of_grid_points()

get_number_of_k_points()[source]

See qepy.driver.Driver.get_number_of_k_points()

get_number_of_spins()[source]

See qepy.driver.Driver.get_number_of_spins()

get_occupation_numbers(kpt=0, spin=0)[source]

See qepy.driver.Driver.get_occupation_numbers()

get_potential_energy(atoms=None, **kwargs)[source]

See qepy.driver.Driver.get_potential_energy()

get_pseudo_density(spin=None, pad=True, gather=False)[source]

See qepy.driver.Driver.get_pseudo_density()

get_pseudo_wave_function(band=None, kpt=0, spin=0, broadcast=True, pad=True)[source]

See qepy.driver.Driver.get_pseudo_wave_function()

get_spin_polarized()[source]

See qepy.driver.Driver.get_spin_polarized()

get_stress(atoms=None)[source]

Return the stress tensor in the Voigt order (xx, yy, zz, yz, xz, xy)

get_wave_function(band=None, kpt=0)[source]

See qepy.driver.Driver.get_wave_function()

get_xc_functional()[source]

See qepy.driver.Driver.get_xc_functional()

property is_root

See qepy.driver.Driver.is_root()

stop(what='all', **kwargs)[source]

See qepy.driver.Driver.stop()