Package schrodinger :: Package application :: Package matsci :: Package espresso :: Module qeinput :: Class KpointsType
[hide private]
[frames] | no frames]

Class KpointsType

 object --+    
          |    
GenericType --+
              |
             KpointsType

Class to generate QE input XML section related to k-points.

Instance Methods [hide private]
 
setStructure(self, struct)
Set structure in self.struct and several other attributes: self.vecs and self.alat.
 
_cleanData(self, data)
Remove mutually exclusive kpoint types.
 
_validateKpoints(self)
Validate k-points.
list of lists of 3 floats
_generateBandPath(self, path=None, line_density=20.0)
Get list of k-points based on the (currently predefined) path.
list of 6 floats
_generateDensity(self, ngrid, force_gamma=False)
Generate k-point mesh based on unit cell dimensions.
str
__str__(self)
Return XML.
numy.array
_toCart(self, coords)
Transform k-point coordinates from fractional reciprocal to Cartesian reciprocal in the 2pi / alat units.

Inherited from GenericType: __init__, updateWithData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  DEFAULTS = {'kpts_band': False, 'kpts_band_line_density': 20, ...
  KPTS_TYPES = set(['kpts_band', 'kpts_dens', 'kpts_list', 'kpts...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setStructure(self, struct)

 

Set structure in self.struct and several other attributes: self.vecs and self.alat.

Parameters:

_cleanData(self, data)

 

Remove mutually exclusive kpoint types. Top-priority type comes from data variable.

Parameters:
  • data (dict) - Top-priority dictionary of settings
Overrides: GenericType._cleanData

_validateKpoints(self)

 

Validate k-points. See PW input file schema documentation

Parameters:
  • kpts_mesh (list) - List of 6 ints (nk1, nk2, nk3 and sk1, sk2, sk3)
  • kpts_list (list) - List of lists of 4 floats (xk_x, xk_y, xk_z, wk)

_generateBandPath(self, path=None, line_density=20.0)

 

Get list of k-points based on the (currently predefined) path.

Parameters:
  • path (list of lists of 3 floats or None) - list of k-points in reciprocal fractional coordinates
  • line_density (float) - Density of the k-points between 'edges'
Returns: list of lists of 3 floats
list of k-point reciprocal Cartesian coordinates

_generateDensity(self, ngrid, force_gamma=False)

 

Generate k-point mesh based on unit cell dimensions. A simple approach of scaling the number of divisions along each reciprocal lattice vector proportional to its length. Uses Gamma centered meshes for hexagonal cells and Monkhorst-Pack grids otherwise.

Parameters:
  • ngrid (int) - Grid density
  • force_gamma (bool) - Enforce Gamma-centered mesh
Returns: list of 6 floats
First 3 floats represent the number of kpoints in grid directions, next 3 floats, offsets in the corresponding direction

__str__(self)
(Informal representation operator)

 

Return XML.

Returns: str
XML string
Overrides: object.__str__

_toCart(self, coords)

 

Transform k-point coordinates from fractional reciprocal to Cartesian reciprocal in the 2pi / alat units.

Parameters:
  • coords (list of 3 floats) - Coordinates of the k-point
Returns: numy.array
Cartesian coordinates of the k-point

Class Variable Details [hide private]

DEFAULTS

Value:
{'kpts_band': False,
 'kpts_band_line_density': 20,
 'kpts_dens': 0,
 'kpts_dens_force_gamma': False,
 'kpts_list': [],
 'kpts_mesh': [6, 6, 6, 1, 1, 1]}

KPTS_TYPES

Value:
set(['kpts_band', 'kpts_dens', 'kpts_list', 'kpts_mesh'])