Strain
- class atomman.defect.Strain(system, neighbors=None, cutoff=None, p_vectors=None, theta_max=27, axes=None, basesystem=None, baseneighbors=None)
Bases:
object
- asdict(properties=None)
Returns a dictionary containing the computed per-atom strain properties. This corresponds to the results from the old nye_tensor function.
- 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.
- 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.