pyiron.atomistics.structure.factory module¶
-
class
pyiron.atomistics.structure.factory.
StructureFactory
[source]¶ Bases:
pyiron_base.generic.factory.PyironFactory
-
static
ase_bulk
(name, crystalstructure=None, a=None, c=None, covera=None, u=None, orthorhombic=False, cubic=False)[source]¶ Creating bulk systems using ASE bulk module. Crystal structure and lattice constant(s) will be guessed if not provided.
name (str): Chemical symbol or symbols as in ‘MgO’ or ‘NaCl’. crystalstructure (str): Must be one of sc, fcc, bcc, hcp, diamond, zincblende,
rocksalt, cesiumchloride, fluorite or wurtzite.
a (float): Lattice constant. c (float): Lattice constant. c_over_a (float): c/a ratio used for hcp. Default is ideal ratio: sqrt(8/3). u (float): Internal coordinate for Wurtzite structure. orthorhombic (bool): Construct orthorhombic unit cell instead of primitive cell which is the default. cubic (bool): Construct cubic unit cell if possible.
- Returns
Required bulk structure
- Return type
-
ase_read
(*args, **kwargs)[source]¶ Returns a ASE’s read result, wrapped as a pyiron.atomstic.structure.atoms.Atoms object.
ase.io.read docstring: Read Atoms object(s) from file.
- filename: str or file
Name of the file to read from or a file descriptor.
- index: int, slice or str
The last configuration will be returned by default. Examples:
index=0
: first configurationindex=-2
: second to lastindex=':'
orindex=slice(None)
: allindex='-3:'
orindex=slice(-3, None)
: three lastindex='::2'
orindex=slice(0, None, 2)
: evenindex='1::2'
orindex=slice(1, None, 2)
: odd
- format: str
Used to specify the file-format. If not given, the file-format will be guessed by the filetype function.
- parallel: bool
Default is to read on master and broadcast to slaves. Use parallel=False to read on all slaves.
- do_not_split_by_at_sign: bool
If False (default)
filename
is splited by at sign@
Many formats allow on open file-like object to be passed instead of
filename
. In this case the format cannot be auto-decected, so theformat
argument should be explicitly given.
-
static
atoms
(symbols=None, positions=None, numbers=None, tags=None, momenta=None, masses=None, magmoms=None, charges=None, scaled_positions=None, cell=None, pbc=None, celldisp=None, constraint=None, calculator=None, info=None, indices=None, elements=None, dimension=None, species=None, **qwargs)[source]¶ Creates a atomistics.structure.atoms.Atoms instance.
- Parameters
elements (list/numpy.ndarray) – List of strings containing the elements or a list of atomistics.structure.periodic_table.ChemicalElement instances
numbers (list/numpy.ndarray) – List of atomic numbers of elements
symbols (list/numpy.ndarray) – List of chemical symbols
positions (list/numpy.ndarray) – List of positions
scaled_positions (list/numpy.ndarray) – List of scaled positions (relative coordinates)
pbc (boolean) – Tells if periodic boundary conditions should be applied
cell (list/numpy.ndarray) – A 3x3 array representing the lattice vectors of the structure
momenta (list/numpy.ndarray) – List of momentum values
tags (list/numpy.ndarray) – A list of tags
masses (list/numpy.ndarray) – A list of masses
magmoms (list/numpy.ndarray) – A list of magnetic moments
charges (list/numpy.ndarray) – A list of point charges
celldisp –
constraint (list/numpy.ndarray) – A list of constraints
calculator – ASE calculator
info (list/str) – ASE compatibility
indices (list/numpy.ndarray) – The list of species indices
dimension (int) – Dimension of the structure
species (list) – List of species
- Returns
The required structure instance
- Return type
-
static
crystal
(element, bravais_basis, lattice_constant)[source]¶ Create a crystal structure using pyiron’s native crystal structure generator
- Parameters
element (str) – Element name
bravais_basis (str) – Basis type
lattice_constant (float/list) – Lattice constants
- Returns
The required crystal structure
- Return type
-
static
element
(parent_element, new_element_name=None, spin=None, potential_file=None)[source]¶ - Parameters
parent_element (str, int) – The parent element eq. “N”, “O”, “Mg” etc.
new_element_name (str) – The name of the new parent element (can be arbitrary)
spin (float) – Value of the magnetic moment (with sign)
potential_file (str) – Location of the new potential file if necessary
- Returns
atomistics.structure.periodic_table.ChemicalElement instance
-
static
surface
(element, surface_type, size=(1, 1, 1), vacuum=1.0, center=False, pbc=True, **kwargs)[source]¶ Generate a surface based on the ase.build.surface module.
- Parameters
element (str) – Element name
surface_type (str) – The string specifying the surface type generators available through ase (fcc111,
etc.) (hcp0001) –
size (tuple) – Size of the surface
vacuum (float) – Length of vacuum layer added to the surface along the z direction
center (bool) – Tells if the surface layers have to be at the center or at one end along the z-direction
pbc (list/numpy.ndarray) – List of booleans specifying the periodic boundary conditions along all three directions.
**kwargs – Additional, arguments you would normally pass to the structure generator like ‘a’, ‘b’,
etc. ('orthogonal') –
- Returns
Required surface
- Return type
pyiron.atomistics.structure.atoms.Atoms instance
-
static
surface_hkl
(lattice, hkl, layers, vacuum=1.0, center=False, pbc=True)[source]¶ Use ase.build.surface to build a surface with surface normal (hkl).
- Parameters
lattice (pyiron.atomistics.structure.atoms.Atoms/str) – bulk Atoms instance or str, e.g. “Fe”, from which to build the surface
hkl (list) – miller indices of surface to be created
layers (int) – # of atomic layers in the surface
vacuum (float) – vacuum spacing
center (bool) – shift all positions to center the surface in the cell
- Returns
Required surface
- Return type
pyiron.atomistics.structure.atoms.Atoms instance
-
static