Wyckoff position#
For Wyckoff related.
- convert_to_bond(bond)[source]#
Convert to bond from str.
- Parameters:
bond (str) – bond.
- Returns:
(ndarray) – bond (vector,center).
Note
bond string is “[tail];[head]/[vector]@[center]/[start]:[vector]”.
- create_cell_bond(group, bond)[source]#
Create bonds in unit cell (sorted, nondirectional and with plus set).
- Parameters:
group (dict) – group dict.
bond (ndarray or str) – bond.
- Returns:
(ndarray) – bonds in unit cell.
(list) – SO mapping (index from 1).
Note
bond string is “[tail];[head]/[vector]@[center]/[start]:[vector]”.
negative value in mapping represents reversed bond.
- create_cell_site(group, site)[source]#
Create sites in unit cell (sorted and with plus set).
- Parameters:
group (dict) – group dict.
site (ndarray or str) – site.
- Returns:
(ndarray) – sites in unit cell.
(list) – SO mapping (index from 1).
Note
site string is “[x,y,z]”.
- create_equivalent_bond(so, so_p, b0_p, shift)[source]#
Create equivalent bond for given bond, v0@s0.
- Parameters:
so (ndarray) – symmetry operation (conventional) (PG:3x3) or (SG:4x4).
so_p (ndarray) – symmetry operation (primitive) (PG:3x3) or (SG:4x4).
b0_p (ndarray) – representative bond (primitive), (vector+center) (float).
shift (bool) – shift center for SG ?
- Returns:
(ndarray) – set of equivalent bond (nondirectional, primitive) (vector+center).
- create_equivalent_site(so_p, s0_p, shift)[source]#
Create equivalent site for given site, s0.
- Parameters:
so_p (ndarray) – symmetry operation (primitive) (PG:3x3) or (SG:4x4).
s0_p (ndarray) – representative site (primitive) (float).
shift (bool) – shift site for SG ?
- Returns:
(ndarray) – set of equivalent site (primitive).
- create_mapping(all_vec, u_vec, tol=1e-08)[source]#
Create mapping for vector list.
- Parameters:
all_vec (ndarray) – vector list.
u_vec (ndarray) – unique vector list.
tol (float, optional) – tolerance for same vector.
- Returns:
(list) – mapping.
- evaluate_wyckoff_bond(group, b_wp, XYZxyz)[source]#
Evaluate Wyckoff bond for given bond for X, Y, Z, x, y, z (with plus set).
- Parameters:
group (dict) – group dict.
b_wp (str) – Wyckoff bond.
XYZxyz (dict) – X, Y, Z, x, y, z value dict.
- Returns:
(ndarray) – set of Wyckoff bond (vector+center) (plus_set0, plus_set1, …).
- evaluate_wyckoff_site(group, s_wp, xyz)[source]#
Evaluate Wyckoff site for given site for x, y, z (with plus set).
- Parameters:
group (dict) – group dict.
s_wp (str) – Wyckoff site.
xyz (dict) – x, y, z value dict.
- Returns:
(ndarray) – set of Wyckoff site (plus_set0, plus_set1, …).
- find_vector(target, vec, tol=1e-08)[source]#
Find vector (lowest index only).
- Parameters:
target (array-like) – vector.
vec (array-like) – list of vectors.
tol (float, optional) – tolerance for same vector.
- Returns:
(int) – index (when not found, return None).
- find_wyckoff_bond(group, bond)[source]#
Find Wyckoff bond.
- Parameters:
group (dict) – group dict.
bond (ndarray or str) – bond (vector+center) to find.
- Returns:
(str) – Wyckoff bond position (return None when not found).
(ndarray) – set of Wyckoff bond (vector+center) (plus_set0, plus_set1, …).
Note
bond string is “[tail];[head]/[vector]@[center]/[start]:[vector]”.
- find_wyckoff_site(group, site, msg=False)[source]#
Find Wyckoff site.
- Parameters:
group (dict) – group dict.
site (ndarray or str) – site to find.
msg (bool, optional) – MSG ?
- Returns:
(str) – Wyckoff position (return None when not found).
(ndarray) – set of Wyckoff site (plus_set0, plus_set1, …).
Note
site string is “[x,y,z]”.
- find_xyz(pos, site, var=['x', 'y', 'z'])[source]#
Find match in pos for given site, and obtain [x,y,z].
- Parameters:
pos (ndarray) – set of vectors in terms of var.
site (ndarray) – site to match.
var (list, optional) – variable.
- Returns:
(dict) – (x,y,z) value (return None when not found).
- remove_duplicate_vector(vec, directional=True)[source]#
Remove duplicate vector.
- Parameters:
vec (array-like) – list of vectors.
directional (bool, optional) – directional vector ?
- Returns:
(ndarray) – vectors.
Note
each vector is assumed to be site(3d) or bond(6d, vector+center).