schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils module

A collection of functions for reading different files and quantities.

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.get_wf_attributes(filename)[source]

Read attributes from a wfc file.

Parameters

filename – the path to the wfc file

Returns

a dictionary with all attributes included reciprocal vectors

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.get_wavefunctions(filename, start_band=None, stop_band=None)[source]

Returns a numpy array with the wave functions for bands from start_band to stop_band. If not specified starts from 1st band and ends with last one. Band numbering is Python style starts from 0.abs

Parameters
  • filename – path to the wfc file

  • start_band – first band to read, default first band in the file

  • stop_band – last band to read, default last band in the file

Returns

a numpy array with shape [nbnd,npw]

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.get_wfc_miller_indices(filename)[source]

Reads miller indices from the wfc file

Parameters

filename – path to the wfc file

Returns

a np.array of integers with shape [igwx,3]

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.read_pseudo_file(xmlfile)[source]

This function reads a pseudopotential XML-like file in the QE UPF format (text), returning the content of each tag in a dictionary. The file is read in strings and completed with a root UPF tag when it lacks, to avoids an XML syntax error.

TODO: add support for UPF-schema files

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.create_header(prefix, nr, nr_smooth, ibrav, celldms, nat, ntyp, atomic_species, atomic_positions)[source]

Creates the header lines for the output charge (or potential) text file as in pp.x. The format is:

system_prefix fft_grid (nr1,nr2,nr3) fft_smooth (nr1,nr2,nr3) nat ntyp ibrav celldms (6 real as in QE) missing line with respect to pp.x List of atoms List of positions for each atom

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.read_postqe_output_file(filename)[source]

This function reads the output charge (or other quantity) as the output format of postqe.

schrodinger.application.matsci.qeschema.qeschema.hdf5.readutils.read_etotv(fname)[source]

Read cell volumes and the corresponding energies from input file fname (1st col, volumes, 2nd col energies). Units must be a.u.^3 and Ryd/cell