principia_materia.phonon_id.analytic_tensors module

class principia_materia.phonon_id.analytic_tensors.AnalyticTensors(structure, supa, order, pg='C1', tol=1e-06)

Bases: DynamicTensors

Analytic dynamic tensor of a reciprocal mesh at a given order.

Parameters:
  • structure (CrystalFTG object or a structure file of CrystalFTG) – The crystal structure.

  • supa (array of int, shape(dim, dim)) – The supercell matrix.

  • order (int) – Order of the dynamic tensor.

  • pg (str or PointGroup object) – The point group.

  • tol (float, optional, default to 1.0E-6) – Error tolerence.

compute_D_from_ID(irreducible_derivatives)

Compute D by substituting in irreducible derivatives.

Parameters:

irreducible_derivatives (array of complex, shape(n_irreducible_derivatives, )) – The values of the irreducible derivatives.

compute_ID_from_D(dynamic_tensors)

Compute irreducible derivatives from dynamic tensors.

Parameters:

dynamic_tensors (array of complex, shape(len(self._D), norbitals, ..., norbitals)) – The dynamic tensors to compute irreducible derivatives from.

copy()

Make a copy

Returns:

new – A copy of AnalyticTensors object.

Return type:

AnalyticTensors

property irreducible_derivative_names

List of names of irreducible derivatives.

property n_irreducible_derivatives

Number of irreducible derivatives.

set_ADT(full_symmetry=False, conjugate=False, verbose=False)

Construct analytic dynamic tensors of the irreducible Q-points.

Construct analytic dynamic tensor of the irreducible Q-points, collect all irreducible derivatives in a list, and vectorize all the analytic tensors in the irreducible zone with respect to the irreducible derivatives list.

Parameters:
  • full_symmetry (bool, optional, default to False) – If True use full symmetry approach to find the irreducible derivatives; If False use little group approach instead.

  • verbose (bool, optional, default to False) – Whether to print out steps verbally.

set_D(Qpoints, D)

Set vectorized dynamic tensors.

set_irreducible_D(D)

Set vectorized dynamic tensors for irreducible Q-points.

principia_materia.phonon_id.analytic_tensors.get_AnalyticTensors_from_hdf5(h5file, tol=1e-06)

Load AnalyticTensors from HDF5 file.

principia_materia.phonon_id.analytic_tensors.get_AnalyticTensors_hdf5_wrapper()

HDF5 data wrapper for AnalyticTensors class.

principia_materia.phonon_id.analytic_tensors.save_AnalyticTensors_to_hdf5(obj, h5file='analytic_tensors.hdf5', overwrite=False)

Save AnalyticTensors data into HDF5 file.

Parameters:
  • obj (AnalyticTensors) – A AnalyticTensors object.

  • h5file (str or h5py.File/h5py.Group obejct, optional, default to "dynamic_tensors.hdf5") – Path to a HDF5 file or a h5py.File/h5py.Group object.

  • overwrite (bool, optional, default to False) – When the file exists, whether to replace the content of the file with the content to be saved.