wulfric.validate_spglib_data#
- wulfric.validate_spglib_data(cell, atoms, spglib_data) None[source]#
Validate that
cellandatoms["positions"]match the ones on whichspglib_datawas created.In details, it check that
cellis the same asspglib_data.original_cellatoms["positions"]are the same asspglib_data.original_positionswulfric.get_spglib_types(atoms=atoms)is the same asspglib_data.original_types.
- Parameters:
- cell(3, 3) array-like
Matrix of a cell, rows are interpreted as vectors. In the language of spglib the same concept is usually called "basis vectors" or "lattice".
- 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
"species" : (N, ) list of str, optional
"spglib_types" : (N, ) list of int, optional
- spglib_datadict
A dictionary with the added syntactic sugar (i.e. with the dot access to the keys), that is produced via call to
get_spglib_data().
- Raises:
- ValueError
If
cellandatomsdo not matchspglib_data.