ElasticConstants

class atomman.ElasticConstants(**kwargs)

Bases: object

Class for storing and converting elastic constant values

property Cij: ndarray

The stiffness constants in Voigt 6x6 format

property Cij9: ndarray

The stiffness constants in 9x9 format

property Cijkl: ndarray

The stiffness constants in 3x3x3x3 format

property Sij: ndarray

The compliance constants in Voigt 6x6 format

property Sijkl: ndarray

The compliance constants in 3x3x3x3 format

bulk(style: str = 'Hill') float

Returns a bulk modulus estimate.

Parameters:

style (str) – Indicates which style of estimate to use. Default value is ‘Hill’. - ‘Hill’ – Hill estimate (average of Voigt and Reuss). - ‘Voigt’ – Voigt estimate. Uses Cij. - ‘Reuss’ – Reuss estimate. Uses Sij.

cubic(**kwargs)

Set values with three independent cubic moduli.

Parameters:
  • C11 (float) – C11 component of Cij.

  • C12 (float) – C12 component of Cij.

  • C44 (float) – C44 component of Cij.

hexagonal(**kwargs)

Set values with five independent hexagonal moduli. (2 * C66 = C11 - C12)

Parameters:
  • C11 (float, optional) – C11 component of Cij.

  • C12 (float, optional) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C66 (float, optional) – C66 component of Cij.

is_normal(crystal_system: str, atol: float = 0.0001, rtol: float = 0.0001) bool

Checks if current elastic constants agree with values normalized to a specified crystal family (within tolerances).

Parameters:
  • crystal_system (str) – Indicates the crystal system representation to use when building a data model.

  • atol (float, optional) – Absolute tolerance to use. Default value is 1e-4.

  • rtol (float, optional) – Relative tolerance to use. Default value is 1e-4.

Returns:

True if all Cij match within the tolerances, false otherwise.

Return type:

bool

isotropic(**kwargs)

Set values with two independent isotropic moduli.

Parameters:
  • C11 (float, optional) – C11 component of Cij.

  • C12 (float, optional) – C12 component of Cij.

  • C44 (float, optional) – C44 component of Cij.

  • M (float, optional) – P-wave modulus(Equivalent to C11).

  • lambda (float, optional) – Lame’s first parameter (Equivalent to C12).

  • mu (float, optional) – Shear modulus (Equivalent to C44).

  • E (float, optional) – Young’s modulus

  • nu (float, optional) – Poisson’s ratio

  • K (float, optional) – Bulk modulus

model(model: str | IOBase | DataModelDict | None = None, unit: str | None = None, crystal_system: str = 'triclinic') DataModelDict | None

Return or set DataModelDict representation of the elastic constants.

Parameters:
  • model (DataModelDict, string, or file-like object, optional) – Data model containing exactly one ‘elastic-constants’ branch to read.

  • unit (str, optional) – Units or pressure to save values in when building a data model. Default value is None (no conversion).

  • crystal_system (str, optional) – Indicates the crystal system representation to normalize by. Default value is ‘triclinic’, i.e. no normalization.

Returns:

If model is not given as a parameter.

Return type:

DataModelDict

monoclinic(**kwargs)

Set values with thirteen independent monoclinic moduli.

Parameters:
  • C11 (float) – C11 component of Cij.

  • C12 (float) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C15 (float) – C15 component of Cij.

  • C22 (float) – C22 component of Cij.

  • C23 (float) – C23 component of Cij.

  • C25 (float) – C25 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C35 (float) – C35 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C46 (float) – C46 component of Cij.

  • C55 (float) – C55 component of Cij.

  • C66 (float) – C66 component of Cij.

normalized_as(crystal_system: str) ElasticConstants

Returns a new ElasticConstants object where values of the current are averaged or zeroed out according to a standard crystal system setting. NOTE: no validation checks are made to evaluate whether such normalizations should be done! That is left up to you (compare values before and after normalization).

Parameters:

crystal_system (str) – Indicates the crystal system representation to use when building a data model.

Returns:

The elastic constants normalized according to the crystal system symmetries.

Return type:

atomman.ElasticConstants

orthorhombic(**kwargs)

Set values with nine independent orthorhombic moduli.

Parameters:
  • C11 (float) – C11 component of Cij.

  • C12 (float) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C22 (float) – C22 component of Cij.

  • C23 (float) – C23 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C55 (float) – C55 component of Cij.

  • C66 (float) – C66 component of Cij.

rhombohedral(**kwargs)

Set values with six or seven independent rhombohedral moduli. (2 * C66 = C11 - C12)

Parameters:
  • C11 (float, optional) – C11 component of Cij.

  • C12 (float, optional) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C14 (float) – C14 component of Cij.

  • C15 (float, optional) – C15 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C66 (float, optional) – C66 component of Cij.

shear(style: str = 'Hill') float

Returns a shear modulus estimate.

Parameters:

style (str) – Indicates which style of estimate to use. Default value is ‘Hill’. - ‘Hill’ – Hill estimate (average of Voigt and Reuss). - ‘Voigt’ – Voigt estimate. Uses Cij. - ‘Reuss’ – Reuss estimate. Uses Sij.

tetragonal(**kwargs)

Set values with six or seven independent tetragonal moduli.

Parameters:
  • C11 (float) – C11 component of Cij.

  • C12 (float) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C16 (float, optional) – C16 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C66 (float) – C66 component of Cij.

transform(axes: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], tol: float = 1e-08) ElasticConstants

Transforms the elastic constant matrix based on the supplied axes.

Parameters:
  • axes (numpy.ndarray) – (3, 3) array giving three right-handed orthogonal vectors to use for transforming.

  • tol (float, optional) – Relative tolerance to use in identifying near-zero terms.

Returns:

A new ElasticConstants object that has been transformed.

Return type:

ElasticConstants

triclinic(**kwargs)

Set values with twenty one independent triclinic moduli

Parameters:
  • C11 (float) – C11 component of Cij.

  • C12 (float) – C12 component of Cij.

  • C13 (float) – C13 component of Cij.

  • C14 (float) – C14 component of Cij.

  • C15 (float) – C15 component of Cij.

  • C16 (float) – C16 component of Cij.

  • C22 (float) – C22 component of Cij.

  • C23 (float) – C23 component of Cij.

  • C24 (float) – C24 component of Cij.

  • C25 (float) – C25 component of Cij.

  • C26 (float) – C26 component of Cij.

  • C33 (float) – C33 component of Cij.

  • C34 (float) – C34 component of Cij.

  • C35 (float) – C35 component of Cij.

  • C36 (float) – C36 component of Cij.

  • C44 (float) – C44 component of Cij.

  • C45 (float) – C45 component of Cij.

  • C46 (float) – C46 component of Cij.

  • C55 (float) – C55 component of Cij.

  • C56 (float) – C56 component of Cij.

  • C66 (float) – C66 component of Cij.