Crystal structures#
- class pyemaps.xtal.ACoord(symb='', coord=None)#
Bases:
objectAn atom in a crystal structure: its element symbol and position.
- __init__(symb='', coord=None)#
- Parameters:
symb (str, optional) – the element symbol.
coord (list or numpy.ndarray of three numbers, optional) – the position
[x, y, z], in Å.
- Raises:
MxtalError – if symb isn’t a string, or coord isn’t three numbers.
- property symb#
The element symbol.
- property coord#
The position
[x, y, z], in Å.
- class pyemaps.xtal.Xtal#
Bases:
objectA crystal structure, as built by
generateMxtal(): the cell constants of the block and a list of atoms.Index it like a list to get an atom, an
ACoord. Printing it gives the structure in XYZ format.- __init__()#
Create an empty structure, with cell constants
[0, 0, 0, 90, 90, 90]and no atoms.
- property cell#
The cell constants
[a, b, c, alpha, beta, gamma]: lengths in Å, angles in degrees.
- add(symb, c)#
Add an atom to the structure.
- Parameters:
symb (str) – the element symbol.
c (list or numpy.ndarray of three numbers) – the position
[x, y, z], in Å.
- Raises:
MxtalError – if symb or c is invalid.