wulfric.crystal.sc_get_variation#
- wulfric.crystal.sc_get_variation(cell, atoms, spglib_data=None)[source]#
Return variation of the lattice as defined in the paper by Setyawan and Curtarolo [1].
- Parameters:
- cell(3, 3) array-like
Matrix of a cell, rows are interpreted as vectors.
- atomsdict
Dictionary with N atoms. Expected keys:
"positions" : (N, 3) array-like
Positions of the atoms in the basis of lattice vectors (
cell). In other words - relative coordinates of atoms."names" : (N, ) list of str, optional
See Notes
"species" : (N, ) list of str, optional
See Notes
"spglib_types" : (N, ) list of int, optional
See Notes
Hint
Pass
atoms = dict(positions=[[0, 0, 0]], spglib_types=[1])if you would like to interpret thecellalone (effectively assuming that thecellis a primitive one).- spglib_data
SyntacticSugar, optional If you need more control on the parameters passed to the spglib, then you can get
spglib_datamanually and pass it to this function. Use wulfric's interface to spglib asspglib_data = wulfric.get_spglib_data(...)
using the same
cellandatoms["positions"]that you are passing to this function.
- Returns:
- variationstr
Variation of the lattice defined by the
cell.
Notes
spglib uses
typesto distinguish the atoms. To see how wulfric deduces thetypesfor given atoms seewulfric.get_spglib_types().References
[1]Setyawan, W. and Curtarolo, S., 2010. High-throughput electronic band structure calculations: Challenges and tools. Computational materials science, 49(2), pp. 299-312.
Examples
>>> import wulfric >>> # There is no variation of cubic lattice, therefore, just lattice type is >>> # returned >>> wulfric.crystal.sc_get_variation( ... cell=[[1, 0, 0], [0, 1, 0], [0, 0, 1]], ... atoms=dict(positions=[[0, 0, 0]], spglib_types=[1]), ... ) 'CUB' >>> cell = wulfric.cell.sc_get_example("bct") >>> wulfric.crystal.sc_get_variation( ... cell=cell, ... atoms=dict(positions=[[0, 0, 0]], spglib_types=[1]), ... ) 'BCT1'