Package data :: Module align_tensor
[hide private]
[frames] | no frames]

Module align_tensor

source code

Classes [hide private]
  AlignTensorList
List type data container for holding all the alignment tensors.
  AlignTensorData
An empty data container for the alignment tensor elements.
  AlignTensorSimList
Empty data container for Monte Carlo simulation alignment tensor data.
Functions [hide private]
3x3 numpy float64 array
calc_A(Axx, Ayy, Azz, Axy, Axz, Ayz)
Function for calculating the alignment tensor (in the structural frame).
source code
numpy rank-1 5D tensor
calc_A_5D(Axx, Ayy, Azz, Axy, Axz, Ayz)
Function for calculating the alignment tensor in the 5D vector notation.
source code
numpy array ((3, 3), float64)
calc_A_diag(A)
Calculate the diagonalised alignment tensor.
source code
float
calc_Aa(A_diag)
Calculate the anisotropic parameter Aa.
source code
float
calc_Ar(A_diag)
Calculate the rhombic parameter Ar.
source code
float
calc_Axxyy(Axx, Ayy)
Function for calculating the Axx-yy value.
source code
float
calc_Azz(Axx, Ayy)
Function for calculating the Azz value.
source code
tuple of numpy array (float64)
calc_eigvals(A)
Calculate the eigenvalues and eigenvectors of the alignment tensor (A).
source code
float
calc_eta(A_diag)
Calculate the asymmetry parameter eta.
source code
tuple of float
calc_euler(rotation)
Calculate the zyz notation Euler angles.
source code
3x3 numpy float64 array
calc_S(Sxx, Syy, Szz, Sxy, Sxz, Syz)
Function for calculating the alignment tensor (in the structural frame).
source code
numpy rank-1 5D tensor
calc_S_5D(Sxx, Syy, Szz, Sxy, Sxz, Syz)
Function for calculating the alignment tensor in the 5D vector notation.
source code
numpy array ((3, 3), float64)
calc_S_diag(tensor)
Calculate the diagonalised alignment tensor.
source code
float
calc_Sxx(Axx)
Function for calculating the Axx value.
source code
float
calc_Sxxyy(Sxx, Syy)
Function for calculating the Sxx-yy value.
source code
float
calc_Sxy(Axy)
Function for calculating the Axy value.
source code
float
calc_Sxz(Axz)
Function for calculating the Axz value.
source code
float
calc_Syy(Ayy)
Function for calculating the Ayy value.
source code
float
calc_Syz(Ayz)
Function for calculating the Ayz value.
source code
float
calc_Szz(Sxx, Syy)
Function for calculating the Szz value.
source code
3x3 numpy float64 array
calc_P(Axx, Ayy, Azz, Axy, Axz, Ayz)
Function for calculating the alignment tensor (in the structural frame).
source code
numpy rank-1 5D tensor
calc_P_5D(Axx, Ayy, Azz, Axy, Axz, Ayz)
Function for calculating the alignment tensor in the 5D vector notation.
source code
numpy array ((3, 3), float64)
calc_P_diag(tensor)
Calculate the diagonalised alignment tensor.
source code
float
calc_Pxx(Axx)
Function for calculating the Pxx value.
source code
float
calc_Pxxyy(Pxx, Pyy)
Function for calculating the Pxx-yy value.
source code
float
calc_Pxy(Axy)
Function for calculating the Pxy value.
source code
float
calc_Pxz(Axz)
Function for calculating the Pxz value.
source code
float
calc_Pyy(Ayy)
Function for calculating the Pyy value.
source code
float
calc_Pyz(Ayz)
Function for calculating the Pyz value.
source code
float
calc_Pzz(Pxx, Pyy)
Function for calculating the Pzz value.
source code
float
calc_R(Aa, Ar)
Calculate the rhombicity parameter R.
source code
list
calc_rotation(A)
Calculate the rotation matrix from the molecular frame to the tensor frame.
source code
numpy array (float64)
calc_unit_x(rotation)
Calculate the x unit vector.
source code
numpy array (float64)
calc_unit_y(rotation)
Calculate the y unit vector.
source code
numpy array (float64)
calc_unit_z(rotation)
Calculate the z unit vector.
source code
 
dependency_generator()
Generator for the automatic updating the alignment tensor data structures.
source code
Variables [hide private]
  __package__ = 'data'

Imports: search, cos, sin, array, dot, eye, float64, identity, transpose, zeros, det, eig, eigvals, ListType, Element, nan, R_to_euler_zyz, RelaxError, fill_object_contents, xml_to_object


Function Details [hide private]

calc_A(Axx, Ayy, Azz, Axy, Axz, Ayz)

source code 

Function for calculating the alignment tensor (in the structural frame).

Parameters:
  • Axx (float) - The Axx tensor element.
  • Ayy (float) - The Ayy tensor element.
  • Azz (float) - The Azz tensor element.
  • Axy (float) - The Axy tensor element.
  • Axz (float) - The Axz tensor element.
  • Ayz (float) - The Ayz tensor element.
Returns: 3x3 numpy float64 array
The alignment tensor (within the structural frame).

calc_A_5D(Axx, Ayy, Azz, Axy, Axz, Ayz)

source code 

Function for calculating the alignment tensor in the 5D vector notation.

Parameters:
  • Axx (float) - The Axx tensor element.
  • Ayy (float) - The Ayy tensor element.
  • Azz (float) - The Azz tensor element.
  • Axy (float) - The Axy tensor element.
  • Axz (float) - The Axz tensor element.
  • Ayz (float) - The Ayz tensor element.
Returns: numpy rank-1 5D tensor
The alignment 5D tensor (within the structural frame).

calc_A_diag(A)

source code 

Calculate the diagonalised alignment tensor.

The diagonalised alignment tensor is defined as:

              | Axx'  0    0  |
   tensor  =  |  0   Ayy'  0  |.
              |  0    0   Azz'|

The diagonalised alignment tensor is calculated by eigenvalue decomposition.

Parameters:
  • A (numpy array ((3, 3), float64)) - The full alignment tensor.
Returns: numpy array ((3, 3), float64)
The diagonalised alignment tensor.

calc_Aa(A_diag)

source code 

Calculate the anisotropic parameter Aa.

This is given by:

   Aa = 3/2Azz = Szz,

where Azz and Szz are the eigenvalues.

Parameters:
  • A_diag (numpy array ((3, 3), float64)) - The full alignment tensor, diagonalised.
Returns: float
The Aa parameter

calc_Ar(A_diag)

source code 

Calculate the rhombic parameter Ar.

This is given by:

   Ar = Axx - Ayy,

where Axx and Ayy are the eigenvalues.

Parameters:
  • A_diag (numpy array ((3, 3), float64)) - The full alignment tensor, diagonalised.
Returns: float
The Ar parameter

calc_Axxyy(Axx, Ayy)

source code 

Function for calculating the Axx-yy value.

The equation for calculating the parameter is:

   Axx-yy  =  Axx - Ayy.
Parameters:
  • Axx (float) - The Axx component of the alignment tensor.
  • Ayy (float) - The Ayy component of the alignment tensor.
Returns: float
The Axx-yy component of the alignment tensor.

calc_Azz(Axx, Ayy)

source code 

Function for calculating the Azz value.

The equation for calculating the parameter is:

   Azz  =  - Axx - Ayy.
Parameters:
  • Axx (float) - The Axx component of the alignment tensor.
  • Ayy (float) - The Ayy component of the alignment tensor.
Returns: float
The Azz component of the alignment tensor.

calc_eigvals(A)

source code 

Calculate the eigenvalues and eigenvectors of the alignment tensor (A).

Parameters:
  • A (numpy array ((3, 3), float64)) - The full alignment tensor.
Returns: tuple of numpy array (float64)
The eigensystem.

calc_eta(A_diag)

source code 

Calculate the asymmetry parameter eta.

This is given by:

   eta = (Axx - Ayy) / Azz

where Aii are the eigenvalues.

Parameters:
  • A_diag (numpy array ((3, 3), float64)) - The full alignment tensor, diagonalised.
Returns: float
The eta parameter

calc_euler(rotation)

source code 

Calculate the zyz notation Euler angles.

Parameters:
  • rotation (numpy 3D, rank-2 array) - The rotation matrix.
Returns: tuple of float
The Euler angles alpha, beta, and gamma in zyz notation.

calc_S(Sxx, Syy, Szz, Sxy, Sxz, Syz)

source code 

Function for calculating the alignment tensor (in the structural frame).

Parameters:
  • Sxx (float) - The Sxx tensor element.
  • Syy (float) - The Syy tensor element.
  • Szz (float) - The Szz tensor element.
  • Sxy (float) - The Sxy tensor element.
  • Sxz (float) - The Sxz tensor element.
  • Syz (float) - The Syz tensor element.
Returns: 3x3 numpy float64 array
The alignment tensor (within the structural frame).

calc_S_5D(Sxx, Syy, Szz, Sxy, Sxz, Syz)

source code 

Function for calculating the alignment tensor in the 5D vector notation.

Parameters:
  • Sxx (float) - The Sxx tensor element.
  • Syy (float) - The Syy tensor element.
  • Szz (float) - The Szz tensor element.
  • Sxy (float) - The Sxy tensor element.
  • Sxz (float) - The Sxz tensor element.
  • Syz (float) - The Syz tensor element.
Returns: numpy rank-1 5D tensor
The alignment 5D tensor (within the structural frame).

calc_S_diag(tensor)

source code 

Calculate the diagonalised alignment tensor.

The diagonalised alignment tensor is defined as:

              | Sxx'  0    0  |
   tensor  =  |  0   Syy'  0  |.
              |  0    0   Szz'|

The diagonalised alignment tensor is calculated by eigenvalue decomposition.

Parameters:
  • tensor (numpy array ((3, 3), float64)) - The full alignment tensor in its eigenframe.
Returns: numpy array ((3, 3), float64)
The diagonalised alignment tensor.

calc_Sxx(Axx)

source code 

Function for calculating the Axx value.

The equation for calculating the parameter is:

   Sxx  =  3/2 Axx.
Parameters:
  • Axx (float) - The Axx component of the alignment tensor.
Returns: float

calc_Sxxyy(Sxx, Syy)

source code 

Function for calculating the Sxx-yy value.

The equation for calculating the parameter is:

   Sxx-yy  =  Sxx - Syy.
Parameters:
  • Sxx (float) - The Sxx component of the Saupe order matrix.
  • Syy (float) - The Syy component of the Saupe order matrix.
Returns: float
The Sxx-yy component of the Saupe order matrix.

calc_Sxy(Axy)

source code 

Function for calculating the Axy value.

The equation for calculating the parameter is:

   Sxy  =  3/2 Axy.
Parameters:
  • Axy (float) - The Axy component of the alignment tensor.
Returns: float

calc_Sxz(Axz)

source code 

Function for calculating the Axz value.

The equation for calculating the parameter is:

   Sxz  =  3/2 Axz.
Parameters:
  • Axz (float) - The Axz component of the alignment tensor.
Returns: float

calc_Syy(Ayy)

source code 

Function for calculating the Ayy value.

The equation for calculating the parameter is:

   Syy  =  3/2 Ayy.
Parameters:
  • Ayy (float) - The Ayy component of the alignment tensor.
Returns: float

calc_Syz(Ayz)

source code 

Function for calculating the Ayz value.

The equation for calculating the parameter is:

   Syz  =  3/2 Ayz.
Parameters:
  • Ayz (float) - The Ayz component of the alignment tensor.
Returns: float

calc_Szz(Sxx, Syy)

source code 

Function for calculating the Szz value.

The equation for calculating the parameter is:

   Szz  =  - Sxx - Syy.
Parameters:
  • Sxx (float) - The Sxx component of the Saupe order matrix.
  • Syy (float) - The Syy component of the Saupe order matrix.
Returns: float
The Szz component of the Saupe order matrix.

calc_P(Axx, Ayy, Azz, Axy, Axz, Ayz)

source code 

Function for calculating the alignment tensor (in the structural frame).

Parameters:
  • Axx (float) - The Axx tensor element.
  • Ayy (float) - The Ayy tensor element.
  • Azz (float) - The Azz tensor element.
  • Axy (float) - The Axy tensor element.
  • Axz (float) - The Axz tensor element.
  • Ayz (float) - The Ayz tensor element.
Returns: 3x3 numpy float64 array
The alignment tensor (within the structural frame).

calc_P_5D(Axx, Ayy, Azz, Axy, Axz, Ayz)

source code 

Function for calculating the alignment tensor in the 5D vector notation.

Parameters:
  • Axx (float) - The Axx tensor element.
  • Ayy (float) - The Ayy tensor element.
  • Azz (float) - The Azz tensor element.
  • Axy (float) - The Axy tensor element.
  • Axz (float) - The Axz tensor element.
  • Ayz (float) - The Ayz tensor element.
Returns: numpy rank-1 5D tensor
The alignment 5D tensor (within the structural frame).

calc_P_diag(tensor)

source code 

Calculate the diagonalised alignment tensor.

The diagonalised alignment tensor is defined as:

              | Pxx'  0    0  |
   tensor  =  |  0   Pyy'  0  |.
              |  0    0   Pzz'|

The diagonalised alignment tensor is calculated by eigenvalue decomposition.

Parameters:
  • tensor (numpy array ((3, 3), float64)) - The full alignment tensor in its eigenframe.
Returns: numpy array ((3, 3), float64)
The diagonalised alignment tensor.

calc_Pxx(Axx)

source code 

Function for calculating the Pxx value.

The equation for calculating the parameter is:

   Pxx  =  Axx + 1/3.
Parameters:
  • Axx (float) - The Axx component of the alignment tensor.
Returns: float

calc_Pxxyy(Pxx, Pyy)

source code 

Function for calculating the Pxx-yy value.

The equation for calculating the parameter is:

   Pxx-yy  =  Pxx - Pyy.
Parameters:
  • Pxx (float) - The Pxx component of the alignment tensor.
  • Pyy (float) - The Pyy component of the alignment tensor.
Returns: float
The Pxx-yy component of the alignment tensor.

calc_Pxy(Axy)

source code 

Function for calculating the Pxy value.

The equation for calculating the parameter is:

   Pxy  =  Axy.
Parameters:
  • Axy (float) - The Axy component of the alignment tensor.
Returns: float

calc_Pxz(Axz)

source code 

Function for calculating the Pxz value.

The equation for calculating the parameter is:

   Pxz  =  Axz.
Parameters:
  • Axz (float) - The Axz component of the alignment tensor.
Returns: float

calc_Pyy(Ayy)

source code 

Function for calculating the Pyy value.

The equation for calculating the parameter is:

   Pyy  =  Ayy + 1/3.
Parameters:
  • Ayy (float) - The Ayy component of the alignment tensor.
Returns: float

calc_Pyz(Ayz)

source code 

Function for calculating the Pyz value.

The equation for calculating the parameter is:

   Pyz  =  Ayz.
Parameters:
  • Ayz (float) - The Ayz component of the alignment tensor.
Returns: float

calc_Pzz(Pxx, Pyy)

source code 

Function for calculating the Pzz value.

The equation for calculating the parameter is:

   Pzz  =  1 - Pxx - Pyy.
Parameters:
  • Pxx (float) - The Pxx component of the alignment tensor.
  • Pyy (float) - The Pyy component of the alignment tensor.
Returns: float
The Pzz component of the alignment tensor.

calc_R(Aa, Ar)

source code 

Calculate the rhombicity parameter R.

This is given by:

   R = Ar / Aa.
Parameters:
  • Aa (float) - The Aa parameter.
  • Ar (float) - The Ar parameter.
Returns: float
The R parameter.

calc_rotation(A)

source code 

Calculate the rotation matrix from the molecular frame to the tensor frame.

This is defined by:

   | Azz | >= | Ayy | >= | Axx |.
Parameters:
  • A (numpy array ((3, 3), float64)) - The full alignment tensor.
Returns: list
The array of x, y, and z indices.

calc_unit_x(rotation)

source code 

Calculate the x unit vector.

This is given by the eigenvalue decomposition.

Parameters:
  • rotation (numpy 3D, rank-2 array) - The rotation matrix.
Returns: numpy array (float64)
The x unit vector.

calc_unit_y(rotation)

source code 

Calculate the y unit vector.

This is given by the eigenvalue decomposition.

Parameters:
  • rotation (numpy 3D, rank-2 array) - The rotation matrix.
Returns: numpy array (float64)
The y unit vector.

calc_unit_z(rotation)

source code 

Calculate the z unit vector.

This is given by the eigenvalue decomposition.

Parameters:
  • rotation (numpy 3D, rank-2 array) - The rotation matrix.
Returns: numpy array (float64)
The z unit vector.

dependency_generator()

source code 

Generator for the automatic updating the alignment tensor data structures.

Returns:
This generator successively yields three objects, the target object to update, the list of parameters which if modified cause the target to be updated, and the list of parameters that the target depends upon.