GrainBoundaryGenerator

class GrainBoundaryGenerator(rotation_axis, rotation_angle, sigma, boundary_plane, minimum_electrode_length=None, buffer_layer=None, overlap_distance=None, reduce_by_symmetry=True)

Template for generating grain boundaries.

Parameters:
  • rotation_axis (array of ints) – The rotation axis to use.

  • rotation_angle (PhysicalQuantity of type angle) – The rotation angle to use.

  • sigma (int) – The sigma to use.

  • boundary_plane (array of ints) – The boundary plane.

  • minimum_electrode_length (PhysicalQuantity of type length) – The minimum length of the electrode extension.
    Default: 0.0*Angstrom.

  • buffer_layer (PhysicalQuantity of type length) – The minimum distance from the grain boundary to the electrode extension.
    Default: 0.0*Angstrom.

  • overlap_distance (PhysicalQuantity of type length) – The distance where atoms should be considered overlapping.
    Default: 0.0*Angstrom.

  • reduce_by_symmetry (bool) – Reduce the size using symmetries. If False, the cross section will always be rectangular.
    Default: True.

boundaryPlane()
Returns:

The boundary plane.

Return type:

array of ints

bufferLayer()
Returns:

The minimum distance from the grain boundary to the electrode extension.

Return type:

PhysicalQuantity of type length

bulkConfiguration(bulk_configuration, repeats=None, center_only=True, origin_index=None)

Generate grain boundary configuration.

Parameters:
  • bulk_configuration (BulkConfiguration) – The pristine structure to use.

  • repeats (array of ints) – How to repeat the grain boundary.
    Default: [1, 1, 1].

  • center_only (bool) – True, if atoms should only be removed at the central grain boundary.
    Default: True.

  • origin_index (int) – The atom to be used as the coincident site when creating the grain boundary.

Returns:

The generated configuration with the grain boundary.

Return type:

BulkConfiguration

deviceConfiguration(bulk_configuration, origin_index=None)

Generate device configuration with grain boundary.

Parameters:
  • bulk_configuration (BulkConfiguration) – The pristine structure to use.

  • origin_index (int) – The atom to be used as the coincident site when creating the grain boundary.

Returns:

The generated device.

Return type:

DeviceConfiguration

minimumElectrodeLength()
Returns:

The minimum length of the electrode extension.

Return type:

PhysicalQuantity of type length

overlapDistance()
Returns:

The distance where atoms should be considered overlapping.

Return type:

PhysicalQuantity of type length

reduceBySymmetry()
Returns:

Boolean determining if the structure should be reduced in size using symmetries.

Return type:

bool

rotationAngle()
Returns:

The rotation angle to use.

Return type:

PhysicalQuantity of type angle

rotationAxis()
Returns:

The rotation axis to use.

Return type:

array of ints

sigma()
Returns:

The sigma to use.

Return type:

int

static sigmaOptions(rotation_axis, max_sigma=99)

Get the sigma and rotation angle options for a specified rotation axis.

Parameters:
  • rotation_axis (array of ints) – The rotation axis to use.

  • max_sigma (int) – The upper limit of sigma to return.

Returns:

The supported sigmas and angles.

Return type:

list of tuples

title()
Returns:

The title representation of the grain boundary generator.

Return type:

str

uniqueString()

Return a unique string representing the state of the object.

Usage Example

Generate three examples using tausonite as the input configuration:

  • configuration_1: A grain boundary in a BulkConfiguration, with strontium as the origin_index atom,

  • configuration_2 :A grain boundary in a BulkConfiguration, with titanium as the origin_index atom.

  • configuration_3 :A grain boundary in a DeviceConfiguration, with strontium as the origin_index atom.

# Set up a Tausonite configuration.
fractional_coordinates = [[ 0.5,  0.5,  0.5],
                          [ 0. ,  0. ,  0. ],
                          [ 0.5,  0. ,  0. ],
                          [ 0. ,  0.5,  0. ],
                          [ 0. ,  0. ,  0.5]]

bulk_configuration = BulkConfiguration(
    bravais_lattice=SimpleCubic(3.90528 * Angstrom),
    elements=[Strontium, Titanium, Oxygen, Oxygen, Oxygen],
    fractional_coordinates=fractional_coordinates
)

# Instantiate a generator for BulkConfiguration.
generator = GrainBoundaryGenerator(
    rotation_axis=[0, 0, 1],
    rotation_angle=36.8698976458 * Degrees,
    sigma=5,
    boundary_plane=[-2, -1, 0],
    overlap_distance=0.5 * Angstrom,
    reduce_by_symmetry=True,
)

# Generate a grain boundary in a BulkConfiguration, with strontium as the origin_index atom.
configuration_1 = generator.bulkConfiguration(
    bulk_configuration,
    repeats=[1, 1, 1],
    origin_index=0
)

# Generate a grain boundary in a BulkConfiguration, with titanium as the origin_index atom.
configuration_2 = generator.bulkConfiguration(
    bulk_configuration,
    repeats=[1, 1, 1],
    origin_index=1
)

# Instantiate a generator for DeviceConfiguration.
generator = GrainBoundaryGenerator(
    rotation_axis=[0, 0, 1],
    rotation_angle=36.8698976458 * Degrees,
    sigma=5,
    boundary_plane=[-2, -1, 0],
    minimum_electrode_length=5.0 * Angstrom,
    buffer_layer=5.0 * Angstrom,
    overlap_distance=0.5 * Angstrom,
    reduce_by_symmetry=True,
)

# Generate a grain boundary in a DeviceConfiguration, with strontium as the origin_index atom.
configuration_3 = generator.deviceConfiguration(
    bulk_configuration,
    origin_index=0
)

grain_boundary_generator.py

../../../_images/grain_boundary_generator.png

Fig. 157 Atom color legend: green - strontium, grey - titanium, red - oxygen. a) The input configuration, b) configuration_1, c) configuration_2, and d) configuration_3. The arrows indicate the grain boundary in figures b)-d).