pyiron.atomistics.job.sqs module

class pyiron.atomistics.job.sqs.SQSJob(project, job_name)[source]

Bases: pyiron.atomistics.job.atomistic.AtomisticGenericJob

Produces special quasirandom structures designed to duplicate truly random chemical distributions as well as possible while using finite periodic cells.

A pyiron wrapper for the [SQS code of Dominik Gehringer](https://github.com/dgehringer/sqsgenerator).

‘Structural models used in calculations of properties of substitutionally random $A_{1-x}B_x$ alloys are usually constructed by randomly occupying each of the N sites of a periodic cell by A or B. We show that it is possible to design ‘‘special quasirandom structures’’ (SQS’s) that mimic for small N (even N=8) the first few, physically most relevant radial correlation functions of a perfectly random structure far better than the standard technique does. We demonstrate the usefulness of these SQS’s by calculating optical and thermodynamic properties of a number of semiconductor alloys in the local-density formalism.’ From the abstract of Zunger, Wei, Ferreira, and Bernard, Phys. Rev. Lett. 65 (1990) 353, DOI:https://doi.org/10.1103/PhysRevLett.65.353

Input:
  • mole_fractions (dict): Approximate chemical composition for the output structure(s), using chemical symbols

    as the keys and floats as the values. Values should sum to 1, but within reason will be automatically adjusted to accommodate the number of atoms in the provided structure (adjustments printed to standard out). Vacancies can also be included using the key ‘0’.

  • weights (list/numpy.ndarray): Specifies the weights of the individual shells. (Default is None, which uses the

    inverse of the shell number for the weight, i.e. [1, 0.5, 0.3333333333, 0.25, 0.2, 0.166666667, 0.1428571429].)

  • objective (float): Specifies the value the objective functions. The program tries to reach the specified

    objective function. (Default is 0.)

  • iterations (int): How many iterations to make searching for the most special quasirandom structure using a

    random shuffling procedure. (Default is 1e6)

  • n_output_structures (int): How many different SQS structures to return (in decreasing special

    quasirandomness). (Default is 1.)

Example

Case I: Get SQS for a given mole fraction:

>>> job = SQSJob(job_name='sqs')
>>> job.structure = structure
>>> job.input.mole_fractions = {'Al': 0.8, 'Ni':0.2}
>>> job.run()

Case II: Get SQS for a given structure already containing at least 2 elements:

>>> job = SQSJob(job_name='sqs')
>>> job.structure = structure
>>> job.run()

In Case II, if the mole fractions will be overwritten if you specify the values (like in Case I)

db_entry()[source]

Generate the initial database entry

Returns

db_dict

Return type

(dict)

from_hdf(hdf=None, group_name=None)[source]

Recreates instance from the hdf5 file :param hdf: Path to the hdf5 file :type hdf: str :param group_name: Name of the group which contains the object :type group_name: str

get_structure(iteration_step=- 1, wrap_atoms=True)[source]

Gets the structure from a given iteration step of the simulation (MD/ionic relaxation). For static calculations there is only one ionic iteration step :param iteration_step: Step for which the structure is requested :type iteration_step: int :param wrap_atoms: True if the atoms are to be wrapped back into the unit cell :type wrap_atoms: bool

Returns

The required structure

Return type

pyiron.atomistics.structure.atoms.Atoms

property list_of_structures
list_structures()[source]
publication = {'sqs': {'method': {'author': ['Zunger, A.', 'Wei, S.-H.', 'Ferreira, L.G.', 'Bernard, J.E.'], 'doi': '10.1103/PhysRevLett.65.353', 'issue': '3', 'journal': 'Phys. Rev. Lett.', 'month': 'July', 'numpages': '0', 'pages': '353', 'publisher': 'American Physical Society', 'title': 'Special quasirandom structures', 'url': 'https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.65.353', 'volume': '65'}}}
run_static()[source]

The run static function is called by run to execute the simulation.

to_hdf(hdf=None, group_name=None)[source]

Store the GenericJob in an HDF5 file

Parameters
  • hdf (ProjectHDFio) – HDF5 group object - optional

  • group_name (str) – HDF5 subgroup name - optional

validate_ready_to_run()[source]

Returns:

pyiron.atomistics.job.sqs.get_sqs_structures(structure, mole_fractions, weights=None, objective=0.0, iterations=1000000.0, output_structures=10, num_threads=None)[source]
pyiron.atomistics.job.sqs.pyiron_to_pymatgen(structure)[source]
pyiron.atomistics.job.sqs.pymatgen_to_pyiron(structure)[source]