AlloyConfiguration

class AlloyConfiguration(bravais_lattice, sites, cartesian_coordinates=None, fractional_coordinates=None)

The Cartesian coordinates and fractional coordinates cannot be given at the same time. The list arguments containing the sites and coordinates must have the same length.

Parameters:
  • bravais_lattice (BravaisLattice) – A lattice of the bulk configuration.
  • sites (list of type AlloySite) – A sequence containing the site information of the alloy.
  • cartesian_coordinates (PhysicalQuantity of type length | None) – A sequence containing a sequence of atomic coordinates for each site in the configuration. Has the dimensionality nx3.
    Default: None
  • fractional_coordinates (array(n, 3) | None) – A sequence containing sequences of fractional coordinates for each site in the configuration.
    Default: None
bravaisLattice()
Returns:The Bravais lattice
Return type:BravaisLattice
cartesianCoordinates()
Returns:The Cartesian coordinates of the sites.
Return type:PhysicalQuantity of type length
fractionalCoordinates()
Returns:The fractional coordinates of the bulk configuration as a nx3 array.
Return type:array of floats
repeat(na=1, nb=1, nc=1)

Repeat the AlloyConfiguration with the integer values na, nb, and nc along the three primitive unit cell vectors.

Parameters:
  • na (int) – The repetition along the a-axis.
    Default: 1
  • nb (int) – The repetition along the b-axis.
    Default: 1
  • nc (int) – The repetition along the c-axis.
    Default: 1
Returns:

The repeated bulk system.

Return type:

AlloyConfiguration

sample(rng=None)

Returns a random realization of the alloy as a bulk configuration.

Parameters:rng (numpy.random.RandomState | None) – The random number generator to use. If “None” then the global rng is used.
Returns:A BulkConfiguration with the elements randomly sampled from the AlloySite specifications.
Return type:BulkConfiguration
sites()
Returns:The list of all sites.
Return type:list of type AlloySite
uniqueSites()
Returns:A list of the unique sites.
Return type:list of type AlloySite

Usage Examples

Define an alloy configuration for a 64 atom InGaAs:sub:2 alloy. The sites containing As will not be optimized.

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

# Define site types
# Site type with fixed occupancy, sites of these type will NOT be optimized.
site_a = AlloySite(Arsenic=1.0)

# Site type with fractional occupancy, site of these type will be optimized.
site_b = AlloySite(Gallium=0.5, Indium=0.5)

# Define sites
sites = [
    site_b, site_b, site_b, site_b, site_b, site_b, site_b, site_b,
    site_a, site_a, site_a, site_a, site_a, site_a, site_a, site_a,
    site_b, site_b, site_b, site_b, site_b, site_b, site_b, site_b,
    site_a, site_a, site_a, site_a, site_a, site_a, site_a, site_a,
    site_b, site_b, site_b, site_b, site_b, site_b, site_b, site_b,
    site_a, site_a, site_a, site_a, site_a, site_a, site_a, site_a,
    site_b, site_b, site_b, site_b, site_b, site_b, site_b, site_b,
    site_a, site_a, site_a, site_a, site_a, site_a, site_a, site_a,
]

# Define coordinates
cartesian_coordinates = [[ 0.      ,  0.      ,  0.      ],
                         [ 0.      ,  0.      ,  5.6537  ],
                         [ 0.      ,  5.6537  ,  0.      ],
                         [ 0.      ,  5.6537  ,  5.6537  ],
                         [ 5.6537  ,  0.      ,  0.      ],
                         [ 5.6537  ,  0.      ,  5.6537  ],
                         [ 5.6537  ,  5.6537  ,  0.      ],
                         [ 5.6537  ,  5.6537  ,  5.6537  ],
                         [ 1.413425,  1.413425,  1.413425],
                         [ 1.413425,  1.413425,  7.067125],
                         [ 1.413425,  7.067125,  1.413425],
                         [ 1.413425,  7.067125,  7.067125],
                         [ 7.067125,  1.413425,  1.413425],
                         [ 7.067125,  1.413425,  7.067125],
                         [ 7.067125,  7.067125,  1.413425],
                         [ 7.067125,  7.067125,  7.067125],
                         [ 2.82685 ,  2.82685 ,  0.      ],
                         [ 2.82685 ,  2.82685 ,  5.6537  ],
                         [ 2.82685 ,  8.48055 ,  0.      ],
                         [ 2.82685 ,  8.48055 ,  5.6537  ],
                         [ 8.48055 ,  2.82685 ,  0.      ],
                         [ 8.48055 ,  2.82685 ,  5.6537  ],
                         [ 8.48055 ,  8.48055 ,  0.      ],
                         [ 8.48055 ,  8.48055 ,  5.6537  ],
                         [ 4.240275,  4.240275,  1.413425],
                         [ 4.240275,  4.240275,  7.067125],
                         [ 4.240275,  9.893975,  1.413425],
                         [ 4.240275,  9.893975,  7.067125],
                         [ 9.893975,  4.240275,  1.413425],
                         [ 9.893975,  4.240275,  7.067125],
                         [ 9.893975,  9.893975,  1.413425],
                         [ 9.893975,  9.893975,  7.067125],
                         [ 2.82685 ,  0.      ,  2.82685 ],
                         [ 2.82685 ,  0.      ,  8.48055 ],
                         [ 2.82685 ,  5.6537  ,  2.82685 ],
                         [ 2.82685 ,  5.6537  ,  8.48055 ],
                         [ 8.48055 ,  0.      ,  2.82685 ],
                         [ 8.48055 ,  0.      ,  8.48055 ],
                         [ 8.48055 ,  5.6537  ,  2.82685 ],
                         [ 8.48055 ,  5.6537  ,  8.48055 ],
                         [ 4.240275,  1.413425,  4.240275],
                         [ 4.240275,  1.413425,  9.893975],
                         [ 4.240275,  7.067125,  4.240275],
                         [ 4.240275,  7.067125,  9.893975],
                         [ 9.893975,  1.413425,  4.240275],
                         [ 9.893975,  1.413425,  9.893975],
                         [ 9.893975,  7.067125,  4.240275],
                         [ 9.893975,  7.067125,  9.893975],
                         [ 0.      ,  2.82685 ,  2.82685 ],
                         [ 0.      ,  2.82685 ,  8.48055 ],
                         [ 0.      ,  8.48055 ,  2.82685 ],
                         [ 0.      ,  8.48055 ,  8.48055 ],
                         [ 5.6537  ,  2.82685 ,  2.82685 ],
                         [ 5.6537  ,  2.82685 ,  8.48055 ],
                         [ 5.6537  ,  8.48055 ,  2.82685 ],
                         [ 5.6537  ,  8.48055 ,  8.48055 ],
                         [ 1.413425,  4.240275,  4.240275],
                         [ 1.413425,  4.240275,  9.893975],
                         [ 1.413425,  9.893975,  4.240275],
                         [ 1.413425,  9.893975,  9.893975],
                         [ 7.067125,  4.240275,  4.240275],
                         [ 7.067125,  4.240275,  9.893975],
                         [ 7.067125,  9.893975,  4.240275],
                         [ 7.067125,  9.893975,  9.893975]]*Angstrom

# Set up configuration
alloy_configuration = AlloyConfiguration(
    bravais_lattice=lattice,
    sites=sites,
    cartesian_coordinates=cartesian_coordinates,
)

ingaas_alloy.py

Notes

This configuration type can be used with EvolutionarySQS to generate an optimized random alloy, based on the special quasi-random structure (SQS) method [vdWTdJ+13]. To set up an alloy configuration, you need to specify the Bravais lattice and either the fractional or Cartesian coordinates. This is similar to constructing a BulkConfiguration, however, instead of the list of elements, you need to give a list of AlloySite objects.

If a lattice site has an AlloySite containing only one element with an occupancy of 1, the element will remain fixed during the SQS optimization, whereas for AlloySite objects with fractional occupancies (i.e. more than one element and occupancies < 1) the occupation of this site will be optimized according the element ratio specified in the AlloySite object. Currently only a single type of alloy site with fractional occupancies is supported and an alloy site can only have binary composition, i.e. at maximum be composed of two elements, or one element and one vacancy.

Note that AlloyConfiguration cannot be used in actual calculations. Instead, the BulkConfiguration produced by EvolutionarySQS should be used.

[vdWTdJ+13]A. van de Walle, P. Tiwary, M. de Jong, D.L. Olmsted, M. Asta, A. Dick, D. Shin, Y. Wang, L.-Q. Chen, and Z.-K. Liu. Efficient stochastic generation of special quasirandom structures. Calphad, 42:13 – 18, 2013. URL: http://www.sciencedirect.com/science/article/pii/S0364591613000540.