pengwann.geometry.Geometry#

class pengwann.geometry.Geometry(sites, cell)#

Data structure representing a periodic system of atoms and Wannier centres.

The primary function of this class is to store the geometric information required to identify interatomic and on-site interactions in terms of individual Wannier functions. In addition, for ease of integration into common materials modelling workflows, Geometry objects can be easily converted into Pymatgen Structure objects with the as_structure() method.

Attributes:
sitestuple of Site

The individual Site objects representing each atom/Wannier centre in the structure.

cellndarray of float

The cell vectors associated with the system.

wannier_assignmentstuple of tuple of int

Assign Wannier centres to atoms based on a closest distance criterion.

distance_and_image_matricestuple of ndarray

Compute the distance and image matrices.

Methods

as_structure()

Build a Pymatgen Structure object from the calling Geometry object.

from_xyz(seedname[, path, cell])

Initialise a Geometry object from a seedname_centres.xyz file.

See also

Site

Notes

This class should not normally be initialised using the base constructor. See instead the from_xyz() classmethod.

Examples

To access individual Site objects:

>>> site_0 = geometry[0]

To iterate over all sites:

>>> for site in geometry:
...     # Do something for each Site object.