Strain

class atomman.defect.Strain(system, neighbors=None, cutoff=None, p_vectors=None, theta_max=27, axes=None, basesystem=None, baseneighbors=None)

Bases: object

property G

The computed per-atom lattice correspondence tensor

Type:

numpy.NDArray

property angularvelocity

The computed per-atom angular velocity

Type:

numpy.NDArray

asdict(properties=None)

Returns a dictionary containing the computed per-atom strain properties. This corresponds to the results from the old nye_tensor function.

Parameters:

properties (str or list, optional) – One or more properties. If not given, will include strain, invariant1, invariant2, invariant3, angularvelocity and nye.

Returns:

Containing each of the computed properties.

Return type:

dict

build_p_vectors(basesystem, neighbors=None, cutoff=None)

Builds the p vectors for each atom based on a reference system.

Parameters:
• basesystem (atomman.system) – The base/reference system to use. This should be a defect-free perfect crystal system with atom ids directly corresponding to atoms in any system that you want to analyze with the Nye tensor.

• neighbors (atomman.NeighborList, optional) – The neighbor list associated with system to use. Either neighbors or cutoff must be given, or system must have a neighbors attribute.

• cutoff (float) – Cutoff distance for computing a neighbor list for system. Either neighbors or cutoff must be given, or system have a neighbors attribute.

clear_properties()

Clears all computed properties. Allows for the values to be recomputed using different settings.

property invariant1

The computed per-atom first strain invariant

Type:

numpy.NDArray

property invariant2

The computed per-atom second strain invariant

Type:

numpy.NDArray

property invariant3

The computed per-atom third strain invariant

Type:

numpy.NDArray

property neighbors

The list of neighbors for system.

Type:

atomman.NeighborList

property nye

The computed per-atom Nye tensor

Type:

numpy.NDArray

property p_vectors

The per-atom sets of ideal atom positions.

Type:

numpy.NDArray

property rotation

The computed per-atom rotation tensor

Type:

numpy.NDArray

save_to_system(properties=None)

Saves the computed per-atom strain properties to the given system.

Parameters:

properties (str or list, optional) – One or more properties. If not given, will include strain, invariant1, invariant2, invariant3, angularvelocity and nye.

set_p_vectors(p_vectors, axes=None)

Sets the p vectors for each atom according to a single p vector set to use for all atoms or a list of p vector sets defined for each atom individually.

Parameters:
• p_vectors (array-like object) – List(s) of radial distance vectors between each atom and its nearest neighbors in a perfect crystal setting. If one list of p_vectors is given, then it is applied to all atoms.

• axes (array-like object, optional) – 3x3 array of right-handed orthogonal axes. If given, will be used to transform the p_vectors before computing the Nye tensor.

solve_G(theta_max=None)

Computes the lattice correspondence tensor, G, by comparing all neighbor vectors q in the current system to ideal reference neighbor vectors p.

Parameters:

theta_max (float, optional) – Allows for the theta_max value set during the class initialization to be changed. The maximum theta angle in degrees to use when searching for matches between p vectors and q vectors. Optimum values are dependent on the crystal structure.

solve_nye()

Computes the Nye tensor based on the lattice correspondence tensor G and the current atomic positions.

property strain

The computed per-atom strain tensor

Type:

numpy.NDArray

property system

The system the properties are being computed for.

Type:

atomman.System

property theta_max

The maximum angle in degrees to include in the p-q vector pairings.

Type:

float