LocalStructure

class LocalStructure(configuration, cutoff_radius_structure=None, cutoff_radius_coordination=None, centrosymmetry_neighbors=None)

Class for calculating the local structure parameters.

Parameters:
  • configuration (BulkConfiguration) – The configuration for which the structure analysis should be calculated.
  • cutoff_radius_structure (PhysicalQuantity of type length) – The cutoff radius used for the local structure analysis.
    Default: 8.0 * Angstrom
  • cutoff_radius_coordination (PhysicalQuantity of type length) – The cutoff radius used to calculate the coordination number. Cannot be larger than cutoff_radius.
    Default: 4.0 Angstrom
  • centrosymmetry_neighbors (int) – The number of neighbors for each atom to be included in the centro-symmetry calculation (e.g. 12 for face centered cubic, 8 for body centered cubic).
    Default: 12 (face centered cubic). This should be between 8 and 20.
centrosymmetryParameters(atom_index=None)

Return the list of centrosymmetry parameters for all atoms or a selected atom.

Parameters:atom_index (int) – Index of the atom to return the centrosymmetry parameters for.
Default: Centrosymmetry parameters of all atoms.
Returns:Either an array of all centrosymmetry parameters if atom_index is None, or the parameter for the specified atom.
Return type:numpy.array | float
coordinationNumbers(atom_index=None)

Return the list of coordination numbers for all atoms or a selected atom.

Parameters:atom_index (int) – Index of the atom to return the coordination number for.
Default: Coordination numbers of all atoms.
Returns:Either an array of all coordination numbers if atom_index is None, or the coordination number for the specified atom.
Return type:numpy.array | float
evaluate(atom_index=None)

Return the list of local structure indices for all atoms or a selected atom.

Parameters:atom_index (int) – Index of the atom to return the local crystal structure for.
Default: Local structure of all atoms.
Returns:Either all local structure indices as an array if atom_index is None, or the structure index for the specified atom
Return type:numpy.array | float
metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
setMetatext(metatext)

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

Usage Examples

Analyze the LocalStructure of fcc copper:

# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [3.61496, 0.0, 0.0]*Angstrom
vector_b = [0.0, 3.61496, 0.0]*Angstrom
vector_c = [0.0, 0.0, 3.61496]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Copper, Copper, Copper, Copper]

# Define coordinates
fractional_coordinates = [[ 0.0,  0.0,  0.0],
                          [ 0.5,  0.5,  0.0],
                          [ 0.5,  0.0,  0.5],
                          [ 0.0,  0.5,  0.5]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# -------------------------------------------------------------
# Local structure
# -------------------------------------------------------------
local_structure = LocalStructure(bulk_configuration,
                                 cutoff_radius_structure=8.0*Angstrom,
                                 cutoff_radius_coordination=3.5*Angstrom,
                                 centrosymmetry_neighbors=12)

nlsave('ls_copper.nc', local_structure)
nlprint(local_structure)

# Extract the local structure index of the first atom
ls_atom1 = local_structure.evaluate(atom_index=0)

# Extract the centrosymmetry parameter of the first atom
cs_atom1 = local_structure.centrosymmetryParameters(atom_index=0)

# Extract the coordination number of the first atom
cn_atom1 = local_structure.coordinationNumber(atom_index=0)

local_structure.py

Notes

  • The LocalStructure object assigns a crystal structure type to each atom based on its local environment, as described in [Stu12]. The range of the local atomic environment is specified by the cutoff_radius_structure argument. The assigned crystal structures, however, are not particularly sensitive to the exact choice of this value, and the default setting commonly yields correct results. The results can be visualized by the corresponding plugin of the 3D Viewer.
  • Furthermore, the LocalStructure object calculates the centrosymmetry parameter, as well as the coordination number for each atom.
  • The centrosymmetry parameter quantifies the symmetry of the local environment around each atomic site, as described in [KPH98]. When the atom represents a perfect center of symmetry, a zero value is returned, while deviations from a centrosymmetric arrangement yield values larger than zero. This parameter can, for instance, be used to detect defects in the crystal lattice. For meaningful results, it is important to specify the correct number of nearest neighbors of the considered crystal structure (e.g. 8 for bcc, and 12 for fcc) via the centrosymmetry_neighbors argument.
  • The coordination number returns the number of neighbors of each atom within a given cutoff range, as specified by the cutoff_radius_coordination argument. Unlike the crystal structure indices, the resulting coordination numbers are rather sensitive to the choice of the cutoff and the default setting may not provide the best results for all materials.

[KPH98]C. L. Kelchner, S. J. Plimpton, and J. C. Hamilton. Dislocation nucleation and defect structure during surface indentation. Phys. Rev. B, 58:11085–11088, Nov 1998. doi:10.1103/PhysRevB.58.11085.
[Stu12]A. Stukowski. Structure identification methods for atomistic simulations of crystalline materials. Modelling and Simulation in Materials Science and Engineering, 20(4):45021, 2012. URL: http://stacks.iop.org/0965-0393/20/i=4/a=045021.