pymatgen.phonon.thermal_displacements module

This module provides classes to handle thermal displacement matrices (anisotropic displacement parameters).

class ThermalDisplacementMatrices(thermal_displacement_matrix_cart, structure, temperature, thermal_displacement_matrix_cif=None)[source]

Bases: MSONable

Class to handle thermal displacement matrices This class stores thermal displacement matrices in Ucart format

An earlier implementation based on Matlab can be found here: https://github.com/JaGeo/MolecularToolbox ( J. George, A. Wang, V. L. Deringer, R. Wang, R. Dronskowski, U. Englert, CrystEngComm, 2015, 17, 7414–7422.)

Parameters:
  • thermal_displacement_matrix

    2D numpy array including the thermal_displacement matrix Ucart 1st dimension atom types, then compressed thermal displacement matrix will follow

    U11, U22, U33, U23, U13, U12 (xx, yy, zz, yz, xz, xy) convention similar to “thermal_displacement_matrices.yaml” in phonopy

  • structure – A pymatgen Structure object

  • temperature – temperature at which thermal displacement matrix was determined

  • thermal_displacement_matrix

    2D numpy array including the thermal_displacement matrix Ucif format 1st dimension atom types, then compressed thermal displacement matrix will follow

    U11, U22, U33, U23, U13, U12 (xx, yy, zz, yz, xz, xy) convention similar to “thermal_displacement_matrices.yaml” in phonopy

property B[source]

computation as described in R. W. Grosse-Kunstleve, P. D. Adams, J Appl Cryst 2002, 35, 477–480. Returns: B as a numpy array, first dimension are the atoms in the structure

property U1U2U3[source]

computation as described in R. W. Grosse-Kunstleve, P. D. Adams, J Appl Cryst 2002, 35, 477–480. Returns: numpy array of eigenvalues of Ucart, first dimension are the atoms in the structure

property Ucif[source]

computation as described in R. W. Grosse-Kunstleve, P. D. Adams, J Appl Cryst 2002, 35, 477–480. Returns: Ucif as a numpy array, first dimension are the atoms in the structure

property Ustar[source]

computation as described in R. W. Grosse-Kunstleve, P. D. Adams, J Appl Cryst 2002, 35, 477–480. Returns: Ustar as a numpy array, first dimension are the atoms in the structure

property beta[source]

computation as described in R. W. Grosse-Kunstleve, P. D. Adams, J Appl Cryst 2002, 35, 477–480. Returns: beta as a numpy array, first dimension are the atoms in the structure

compute_directionality_quality_criterion(other)[source]

Will compute directionality of prolate displacement ellipsoids as described in https://doi.org/10.1039/C9CE00794F with the ealier implementation: https://github.com/damMroz/Angle/ :param other: ThermalDisplacementMatrix :param please make sure that the order of the atoms in both objects that are compared: :param is the same. Otherwise: :param this analysis will deliver wrong results:

Returns:

will return a list including dicts for each atom that include “vector0” (largest principal axes of self object),

”vector1” (largest principal axes of the other object), “angle” between both axes,

These vectors can then, for example, be drawn into the structure with VESTA. Vectors are given in cartesian coordinates

static from_Ucif(thermal_displacement_matrix_cif, structure, temperature)[source]

starting from a numpy array, it will convert Ucif values into Ucart values and initialize the class :param thermal_displacement_matrix_cif: np.array,

first dimension are the atoms, then reduced form of thermal displacement matrix will follow Order as above: U11, U22, U33, U23, U13, U12

Parameters:
  • structure – Structure object

  • temperature – float Corresponding temperature

Returns:

ThermalDisplacementMatrices

static get_full_matrix(thermal_displacement)[source]

transfers the reduced matrix to the full matrix (order of reduced matrix U11, U22, U33, U23, U13, U12) :param thermal_displacement: 2d numpy array, first dimension are the atoms

Returns:

3d numpy array including thermal displacements, first dimensions are the atoms

static get_reduced_matrix(thermal_displacement)[source]

transfers the full matrix to reduced matrix (order of reduced matrix U11, U22, U33, U23, U13, U12) :param thermal_displacement: 2d numpy array, first dimension are the atoms

Returns:

3d numpy array including thermal displacements, first dimensions are the atoms

property ratio_prolate[source]

This will compute ratio between largest eigenvalue of Ucart and smallest one Returns:

write_cif(filename)[source]

writes a cif including thermal displacements :param filename: name of the cif file