principia_materia.phonon_id.analytic_dynamic_tensor module
- class principia_materia.phonon_id.analytic_dynamic_tensor.AnalyticDynamicTensor(structure, pg, Qpoint, tol=1e-06)
Bases:
object
Abstract class for analytic representation of dynamic tensor under group theory.
Exploits the group theory to find the irreducible derivatives, and construct the dynamic tensor analytically in both symmetrized basis and naive basis. The analytic form of the dynamic tensor is stored in a vectorized form to facilitate further computation.
The analytic tensor allows us to perform further analysis of the dynamics and thermodynamics of the crystal.
- Parameters:
structure (CrystalFTG object or a structure file of CrystalFTG) – The crystal structure.
pg (str or PointGroup object) – The point group.
Qpoint (array of Fraction or a
parse_array
supported Fraction array.) – The Q-pointtol (float, optional, default to 1.0E-6) – Error tolerence.
- property Qpoint
- compute_tensor(irreducible_derivatives, symmetrized_basis=False)
Substute irreducible derivatives into vectorized tensor to compute dynamic tensor.
- Parameters:
irreducible_derivatives (array of complex, shape(self.n_irreducible_derivatives, )) – The value of irreducible derivatives to substitute in.
symmetrized_basis (bool, optional, default to False) – Whether to return the tensor in symmetrized basis or in naive basis.
- Returns:
tensor – The resulting dynamic tensor after the substitution. If
symmetrized_basis==True
, shape equals self.symmetrized_tensor_shape, Ifsymmetrized_basis==False
, shape equals self.tensor_shape.- Return type:
array of complex
- get_irreducible_basis_rowname(qpoint)
Get the list of names of the rows for the irreducible basis
- Parameters:
qpoint (array of Fraction, shape(dim, )) – A q-point of the Q-point that is being studied.
- get_irreps(qpoint)
Get the list of irreducible representations and it’s instance number of a q-point.
- Parameters:
qpoint (array of Fraction, shape(dim, )) – A q-point of the Q-point that is being studied.
- get_rotation_matrix(qpoint)
Get the rotation matrix from symmetrized basis to naive basis of a q-point within the Q-point.
- Parameters:
qpoint (array of Fraction, shape(dim, )) – A q-point of the Q-point that is being studied.
- property irreducible_derivative_names
The list of names of of all irreducible derivatives in the tensor, also reference for the vectorized tensors.
- property n_irreducible_derivatives
Number of irreducible derivatives
- property order
The order of the irreducible derivatives.
- property qpoint_displacement_rep
- set_irreducible_derivative_names(irreducible_derivative_names, allow_missing=False)
Set the irreducible derivatives names.
- Parameters:
irreducible_derivative_names (list of tuples) – The names of irreducible derivatives.
- abstract set_irreducible_derivatives()
Constructs irreducible derivatives as well as the coefficients for them in the symmetrized basis.
- abstract set_qpoint_displacement_rep()
Find all irreducible derivatives allowed in the given Qpoint and PointGroup.
- set_vectorized_tensor(allow_missing=False)
Constructed vectorized tensor from computed irreducible derivatives.
- solve_irreducible_derivatives(dynamic_tensor, symmetrized_basis=False, tol=None)
Solve for irreducible derivatives from the numerical tensor.
- Parameters:
dynamic_tensor (array of complex) – The numerical dynamic tensor to solve irreducible derivatives with. If
symmetrized_basis==True
,dynamic_tensor.shape == self.symmetrized_tensor_shape
, Ifsymmetrized_basis==False
,dynamic_tensor.shape == self.tensor_shape
.symmetrized_basis (bool, optional, default to False) – If True, the input
dynamic_tensor
is in symmetrized basis, if False, the input is in naive basis.tol (float, optional, default to None) – Error tolerance, if None, use
self.tol
.
- Returns:
irreducible_derivatives (array of complex, shape(self.n_irreducible_derivatives, )) – The least square result of the irreducible derivatives.
residues (float) – The residues of the least square.
rank (int) – The rank of the reshaped analytic tensor, which equals the number of irreducible derivatives.
s (array of complex) – Singular values of the reshaped analytic tensor.
- property symmetrized_tensor_shape
The shape of the dynamic tensor in symmetrized basis.
- property symmetrized_vectorized_tensor
Vectorized analytic dynamic tensor in symmetrized basis.
- property tensor_shape
The shape of the dynamic tensor in naive basis.
- property unique_qpoints
Unique q-points in the Q-point.
- property vectorized_tensor
Vectorized analytic dynamic tensor in naive basis.
- principia_materia.phonon_id.analytic_dynamic_tensor.get_AnalyticDynamicTensor_hdf5_wrapper()
HDF5 data wrapper for AnalyticDynamicTensor class.
- principia_materia.phonon_id.analytic_dynamic_tensor.get_IrreducibleDerivatives_hdf5_wrapper()
HDF5 data wrapper for irreducible derivatives.