Phase#
- class orix.crystal_map.Phase(name: Optional[str] = None, space_group: Optional[Union[int, SpaceGroup]] = None, point_group: Optional[Union[int, str, Symmetry]] = None, structure: Optional[Structure] = None, color: Optional[str] = None)[source]#
Bases:
object
Name, symmetry, and color of a phase in a crystallographic map.
- Parameters:
- name
Phase name. Overwrites the name in the
structure
object.- space_group
Space group describing the symmetry operations resulting from associating the point group with a Bravais lattice, according to the International Tables of Crystallography. If not given, it is set to
None
.- point_group
Point group describing the symmetry operations of the phase’s crystal structure, according to the International Tables of Crystallography. If not given and
space_group
is not given, it set toNone
. IfNone
is passed butspace_group
is notNone
, it is derived from the space group. If bothpoint_group
andspace_group
is notNone
, the space group needs to be derived from the point group.- structure
Unit cell with atoms and a lattice. If not given, a default
Structure
object is created.- color
Phase color. If not given, it is set to
"tab:blue"
(first among the default Matplotlib colors).
Examples
>>> from diffpy.structure import Atom, Lattice, Structure >>> from orix.crystal_map import Phase >>> p = Phase( ... name="al", ... space_group=225, ... structure=Structure( ... atoms=[Atom("al", [0, 0, 0])], ... lattice=Lattice(0.405, 0.405, 0.405, 90, 90, 90) ... ) ... ) >>> p <name: al. space group: Fm-3m. point group: m-3m. proper point group: 432. color: tab:blue> >>> p.structure [al 0.000000 0.000000 0.000000 1.0000] >>> p.structure.lattice Lattice(a=0.405, b=0.405, c=0.405, alpha=90, beta=90, gamma=90)
Attributes
Return the direct lattice vector \(a\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return the reciprocal lattice vector \(a^{*}\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return the direct lattice vector \(b\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return the reciprocal lattice vector \(b^{*}\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return the direct lattice vector \(c\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return or set the name of phase color.
Return the phase color as RGB tuple.
Return the reciprocal lattice vector \(c^{*}\) in the cartesian reference frame of the crystal lattice \(e_i\).
Return whether the crystal structure is hexagonal/trigonal or not.
Return or set the phase name.
Return or set the point group.
Return or set the space group.
Return or set the crystal structure containing a lattice (
Lattice
) and possibly many atoms (Atom
).Methods
Return a deep copy using
deepcopy()
function.Phase.from_cif
(filename)Return a new phase from a CIF file using
diffpy.structure
's CIF file parser.