AlloyLayer

class AlloyLayer(material_specifications, length=None, cleave_plane=None, plane_indices=None, tolerance=None, displacement_vector=None, percentage=None, substitutional_element=None, alloy_method=None, number_of_generations=None, population_size=None, random_seed=None, **kwargs)

Class to specify a crystalline alloy layer materials in the MultilayerBuilder.

Parameters:
  • material_specifications (MaterialSpecifications) – A descriptor of a bulk material, plus the information needed to perform the calculations.

  • length (PhysicalQuantity of type length | None) – Deprecated. use plane indices instead.
    Default: None

  • cleave_plane (sequence of length 3) – The Miller indices of the layer.

  • plane_indices (tuple) – The start and end atomic plane indices from the cleaved configuration, e.g., [0, 1], both inclusive. 0 always corresponds to the bottom layer of the configuration.

  • tolerance (float) – The (logarithmic) detection tolerance used to define atomic planes. Range [-10, 4].

  • displacement_vector (sequence of length 2 | None) – This surface vector is added to the fractional coordinates of the layer configuration.

  • percentage (float) – The percentages of the atoms that should be changed.

  • substitutional_element (PeriodicTableElement) – The element to change to.

  • alloy_method (EvolutionarySQS | SubstitutionalAlloyNormalDistribution | SubstitutionalAlloyFixedFraction | None) – The alloy method to generate the alloy configuration. Options are EvolutionarySQS or SubstitutionalAlloyFixedFraction or SubstitutionalAlloyNormalDistribution. In EvolutionarySQS method, a special quasi-random structure (SQS) is generated using genetic optimization. NormalDistribution means you assign a number [0,1] from a normal distribution across all atoms and only pick those that have a value below the given percentage. FixedFraction means if you set 25%, you get 25% of the total number of atoms changed. The size of the random sample are the percentage of atoms provided, rounded to nearest integer. SubstitutionalAlloy method.
    Default: SubstitutionalAlloyFixedFraction.

  • number_of_generations (int) – This parameter is valid if alloy_method is EvolutionarySQS. The number of times the population should be evolved.

  • population_size (int) – This parameter is valid if alloy_method is EvolutionarySQS. The number of individuals which are part of a population. The population size must be at least 5, but it is recommended to use a large population size (>= 20) to obtain higher quality results.

  • random_seed (int | array of ints | None) – Random seed used to initialize the pseudo-random number generator. Can be any integer between 0 and 2**32 - 1 inclusive, an array (or other sequence) of such integers, or None. If random_seed is None, then it will be generated using values from the system entropy pool.

  • kwargs (dict) – Deprecated keyword arguments.

alloyMethod()
Returns:

The alloy method to generate the alloy configuration. Options are EvolutionarySQS or SubstitutionalAlloyFixedFraction or SubstitutionalAlloyNormalDistribution. In EvolutionarySQS method, a special quasi-random structure (SQS) is generated using genetic optimization. NormalDistribution means you assign a number [0,1] from a normal distribution across all atoms and only pick those that have a value below the given percentage. FixedFraction means if you set 25%, you get 25% of the total number of atoms changed. The size of the random sample are the percentage of atoms provided, rounded to nearest integer. SubstitutionalAlloy method.

Return type:

EvolutionarySQS | SubstitutionalAlloyNormalDistribution | SubstitutionalAlloyFixedFraction | None

displacementVector()
Returns:

This surface vector is added to the fractional coordinates of the layer configuration.

Return type:

sequence of length 2 | None

entry()
Returns:

The entry.

Return type:

HKMGEntry

classmethod entryType()

The type of entry to instantiate.

Returns:

The entry type.

Return type:

InterfacesEntry-based

length()
Returns:

The target length (thickness) of the layer.

Return type:

PhysicalQuantity of type length

materialSpecifications()
Returns:

The descriptor of a bulk material, plus the information needed to perform the calculations.

Return type:

MaterialSpecifications

newElement()
Returns:

The element to change to.

Return type:

PeriodicTableElement | None (vacancy)

numberOfGenerations()
Returns:

This parameter is valid if alloy_method is EvolutionarySQS. The number of times the population should be evolved.

Return type:

int

percentage()
Returns:

The percentages of the atoms that should be changed.

Return type:

float | sequence of floats

populationSize()
Returns:

This parameter is valid if alloy_method is EvolutionarySQS. The number of individuals which are part of a population. The population size must be at least 5, but it is recommended to use a large population size (>= 20) to obtain higher quality results.

Return type:

int

randomSeed()
Returns:

Random seed used to initialize the pseudo-random number generator. Can be any integer between 0 and 2**32 - 1 inclusive, an array (or other sequence) of such integers, or None. If random_seed is None, then it will be generated using values from the system entropy pool.

Return type:

int | array of ints | None

substitutionalElement()
Returns:

The element to change to.

Return type:

PeriodicTableElement | None (vacancy)

uniqueString()

Return a unique string representing the state of the object.

Usage Example

Example of a customized AlloyLayer object to generate an Iron cobalt alloy layer with 30% of Cobalt concentration.

custom_layer = AlloyLayer(
    MaterialSpecificationsDatabase.MRAM_MATERIALS['Iron cobalt (alloy)'],
    percentage=30,
    substitutional_element=Cobalt,
    length=10.0*Angstrom,
    miller_indices=(1, 0, 0),
    alloy_method=EvolutionarySQS,
    )

alloy_layer_example.py

Notes

The AlloyLayer class defines how an alloy layer should be generated by the MultilayerBuilder. The alloy layer can be generated using the EvolutionarySQS or substitutionalAlloy method. The EvolutionarySQS is based on the special quasi-random structure (SQS) method [1]. Currently an alloy layer can only have binary composition, i.e. at maximum be composed of two elements.

Note

The grometry optimization is performed using the material_specifications.relaxationCalculator() calculator. This is normally a machine-learned moment tensor potential (MTP) force-field calculator.