pyiron.atomistics.structure package

Submodules

pyiron.atomistics.structure.atom module

class pyiron.atomistics.structure.atom.Atom(symbol='X', position=(0, 0, 0), tag=None, momentum=None, mass=None, magmom=None, charge=None, atoms=None, index=None, pse=None, element=None, **qwargs)[source]

Bases: pyiron.atomistics.structure.sparse_list.SparseArrayElement

cut_reference_to_atoms()[source]

Cut reference to atoms object.

get(name)[source]

Get name attribute, return None if not explicitely set.

mass
number
position

XYZ-coordinates

set(name, value)[source]

Set name attribute to value.

symbol
x

X-coordinate

y

Y-coordinate

z

Z-coordinate

pyiron.atomistics.structure.atom.abcproperty(index)[source]

Helper function to easily create Atom ABC-property.

pyiron.atomistics.structure.atom.atomproperty(name, doc)[source]

Helper function to easily create Atom attribute property.

pyiron.atomistics.structure.atom.xyzproperty(index)[source]

Helper function to easily create Atom XYZ-property.

pyiron.atomistics.structure.atoms module

class pyiron.atomistics.structure.atoms.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]

Bases: object

The Atoms class represents all the information required to describe a structure at the atomic scale. This class is written in such a way that is compatible with the ASE atoms class. Some of the functions in this module is based on the corresponding implementation in the ASE package

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 (list/numpy.ndarray/boolean) – Tells if periodic boundary conditions should be applied on the three axes
  • cell (list/numpy.ndarray instance) – A 3x3 array representing the lattice vectors of the structure

Note: Only one of elements/symbols or numbers should be assigned during initialization

indices

A list of size N which gives the species index of the structure which has N atoms

Type:numpy.ndarray
add_tag(*args, **qwargs)[source]

Add tags to the atoms object.

Examples

For selective dynamics:

>>> self.add_tag(selective_dynamics=[False, False, False])
analyse_ovito_centro_symmetry(num_neighbors=12)[source]
analyse_ovito_cna_adaptive(mode='total')[source]
analyse_ovito_voronoi_volume()[source]
analyse_phonopy_equivalent_atoms()[source]
append(atom)[source]

Append atom to end. Copied from ase

Parameters:atom

Returns:

cell

A size 3x3 array which gives the lattice vectors of the cell as [a1, a2, a3]

Type:numpy.ndarray
center(vacuum=None, axis=(0, 1, 2))[source]

Center atoms in unit cell.

Adopted from ASE code (https://wiki.fysik.dtu.dk/ase/_modules/ase/atoms.html#Atoms.center)

Parameters:
  • vacuum (float) – If specified adjust the amount of vacuum when centering. If vacuum=10.0 there will thus be 10 Angstrom of vacuum on each side.
  • axis (tuple/list) – List or turple of integers specifying the axis along which the atoms should be centered
center_coordinates_in_unit_cell(origin=0, eps=0.0001)[source]

compact atomic coordinates in supercell as given by a1, a2., a3

Parameters:
  • origin – 0 to confine between 0 and 1, -0.5 to confine between -0.5 and 0.5
  • eps

Returns:

close()[source]
cluster_analysis(id_list, neighbors=None, radius=None, return_cluster_sizes=False)[source]
Parameters:
  • id_list
  • neighbors
  • radius
  • return_cluster_sizes

Returns:

convert_element(el, pse=None)[source]

Convert a string or an atom instance into a ChemicalElement instance

Parameters:
  • el (str/atomistics.structure.atom.Atom) – String or atom instance from which the element should be generated
  • pse (atomistics.structure.periodictable.PeriodicTable) – PeriodicTable instance from which the element is generated (optional)
Returns:

The required chemical element

Return type:

atomistics.structure.periodictable.ChemicalElement

static convert_formula(elements)[source]
Parameters:elements

Returns:

copy()[source]

Returns a copy of the instance

Returns:A copy of the instance
Return type:pyiron.atomistics.structure.atoms.Atoms
elements

A size N list of atomistics.structure.periodic_table.ChemicalElement instances according to the ordering of the atoms in the instance

Type:numpy.ndarray
extend(other)[source]

Extend atoms object by appending atoms from other. Copied from ase

Parameters:other

Returns:

from_hdf(hdf, group_name='structure')[source]

Retrieve the object from a HDF5 file

Parameters:
Returns:

The retrieved atoms class

Return type:

pyiron_atomistic.structure.atoms.Atoms

get_array(name, copy=True)[source]

Get an array. This function is for the purpose of compatibility with the ASE package

Parameters:
  • name (str) – Name of the required array
  • copy (bool) – True if a copy of the array is to be returned
Returns:

An array of a copy of the array

get_atomic_numbers()[source]

Returns the atomic numbers of all the atoms in the structure

Returns:A list of atomic numbers
Return type:numpy.ndarray
get_bonds(radius=None, max_shells=None, prec=0.1, num_neighbors=20)[source]
Parameters:
  • radius
  • max_shells
  • prec – minimum distance between any two clusters (if smaller considered to be single cluster)
  • num_neighbors

Returns:

get_boundary_region(dist)[source]

get all atoms in the boundary around the supercell which have a distance to the supercell boundary of less than dist

Parameters:dist

Returns:

static get_calculator()[source]
get_cell(complete=False)[source]

Get the three unit cell vectors as a 3x3 ndarray.

get_chemical_elements()[source]

Returns the list of chemical element instances

Returns:A list of chemical element instances
Return type:numpy.ndarray
get_chemical_formula()[source]

Returns the chemical formula of structure

Returns:The chemical formula as a string
Return type:str
get_chemical_indices()[source]

Returns the list of chemical indices as ordered in self.species

Returns:A list of chemical indices
Return type:numpy.ndarray
get_chemical_symbols()[source]

Returns the chemical symbols for all the atoms in the structure

Returns:A list of chemical symbols
Return type:numpy.ndarray
get_constraint()[source]
get_density()[source]

Returns the density in g/cm^3

Returns:Density of the structure
Return type:float
get_distance(a0, a1, mic=False, vector=False)[source]

Return distance between two atoms.

Use mic=True to use the Minimum Image Convention. vector=True gives the distance vector (from a0 to a1).

Parameters:
  • a0
  • a1
  • mic
  • vector

Returns:

get_distance_matrix(mic=True, vector=False)[source]

Return distances between all atoms in a matrix. cf. get_distance

get_equivalent_atoms(eps=1e-05)[source]
Parameters:eps

Returns:

get_initial_magnetic_moments()[source]

Get array of initial magnetic moments.

Returns:numpy.array()
get_ir_reciprocal_mesh(mesh, is_shift=array([0, 0, 0], dtype=int32), is_time_reversal=True, symprec=1e-05)[source]
Parameters:
  • mesh
  • is_shift
  • is_time_reversal
  • symprec

Returns:

get_majority_species()[source]

Returns:

get_masses()[source]

Returns:

get_masses_dof()[source]

Returns:

get_neighbors(radius=None, num_neighbors=12, t_vec=True, include_boundary=True, exclude_self=True, tolerance=2, id_list=None, cutoff=None)[source]
Parameters:
  • radius
    distance up to which nearest neighbors are searched for
    used only for periodic boundary padding

    (in absolute units)

  • num_neighbors
  • t_vec (bool) – True: compute distance vectors (pbc are automatically taken into account)
  • include_boundary (bool) – True: search for neighbors assuming periodic boundary conditions False is needed e.g. in plot routines to avoid showing incorrect bonds
  • exclude_self (bool) – include central __atom (i.e. distance = 0)
  • tolerance (int) – tolerance (round decimal points) used for computing neighbor shells
  • id_list
  • cutoff (float) – Upper bound of the distance to which the search must be done
Returns:

Neighbors instances with the neighbor indices, distances and vectors

Return type:

pyiron.atomistics.structure.atoms.Neighbors

get_number_of_atoms()[source]

Returns:

get_number_of_degrees_of_freedom()[source]

Returns:

get_number_of_species()[source]

Returns:

get_number_species_atoms()[source]

Returns a dictionary with the species in the structure and the corresponding count in the structure

Returns:An ordered dictionary with the species and the corresponding count
Return type:collections.OrderedDict
get_parent_basis()[source]

Returns the basis with all user defined/special elements as the it’s parent

Returns:Structure without any user defined elements
Return type:pyiron.atomistics.structure.atoms.Atoms
get_parent_symbols()[source]

Returns the chemical symbols for all the atoms in the structure even for user defined elements

Returns:A list of chemical symbols
Return type:numpy.ndarray
get_pbc()[source]

Returns a boolean array of the periodic boundary conditions along the x, y and z axis respectively

Returns:Boolean array of length 3
Return type:numpy.ndarray
get_positions()[source]

Get positions. This function is for compatability with ASE

Returns:Positions in absolute coordinates
Return type:numpy.ndarray
get_primitive_cell(symprec=1e-05, angle_tolerance=-1.0)[source]
Parameters:
  • symprec
  • angle_tolerance

Returns:

get_scaled_positions(wrap=True)[source]

Returns:

get_shell_matrix(shell, id_list=None, restraint_matrix=None, radius=None, max_num_neighbors=100)[source]
Parameters:
  • neigh_list – user defined get_neighbors (recommended if atoms are displaced from the ideal positions)
  • id_list – cf. get_neighbors
  • radius – cf. get_neighbors
  • max_num_neighbors – cf. get_neighbors
  • restraint_matrix – NxN matrix with True or False, where False will remove the entries. If an integer is given the sum of the chemical indices corresponding to the number will be set to True and the rest to False
Returns:

NxN matrix with 1 for the pairs of atoms in the given shell

get_shell_radius(shell=1, id_list=None)[source]
Parameters:
  • shell
  • id_list

Returns:

get_shells(id_list=None, max_shell=2, radius=None, max_num_neighbors=100)[source]
Parameters:
  • id_list
  • max_shell
  • radius
  • max_num_neighbors

Returns:

get_spacegroup(symprec=1e-05, angle_tolerance=-1.0)[source]
Parameters:
  • symprec
  • angle_tolerance

Returns:

https://atztogo.github.io/spglib/python-spglib.html

get_species_objects()[source]

Returns:

get_species_symbols()[source]

Returns the symbols of the present species

Returns:List of the symbols of the species
Return type:numpy.ndarray
get_symmetry(use_magmoms=False, use_elements=True, symprec=1e-05, angle_tolerance=-1.0)[source]
Parameters:
  • use_magmoms
  • use_elements – True or False. If False, chemical elements will be ignored
  • symprec
  • angle_tolerance

Returns:

get_symmetry_dataset(symprec=1e-05, angle_tolerance=-1.0)[source]
Parameters:
  • symprec
  • angle_tolerance

Returns:

https://atztogo.github.io/spglib/python-spglib.html

get_tags()[source]

Returns the keys of the stored tags of the structure

Returns:Keys of the stored tags
Return type:dict_keys
get_volume()[source]

Returns:

get_voronoi_volume()[source]

Returns:

info

This dictionary is merely used to be compatible with the ASE Atoms class.

Type:dict
new_array(name, a, dtype=None, shape=None)[source]

Adding a new array to the instance. This function is for the purpose of compatibility with the ASE package

Parameters:
  • name (str) – Name of the array
  • a (list/numpy.ndarray) – The array to be added
  • dtype (type) – Data type of the array
  • shape (list/turple) – Shape of the array
numbers_to_elements(numbers)[source]

Convert atomic numbers in element objects (needed for compatibility with ASE)

Parameters:numbers (list) – List of Element Numbers (as Integers; default in ASE)
Returns:A list of elements as needed for pyiron
Return type:list
occupy_lattice(**qwargs)[source]

Replaces specified indices with a given species

pbc

A list of boolean values which gives the periodic boundary consitions along the three axes. The default value is [True, True, True]

Type:list
plot3d(spacefill=True, show_cell=True, camera='perspective', particle_size=0.5, background='white', color_scheme=None, show_axes=True, custom_array=None, custom_3darray=None, select_atoms=None)[source]
Parameters:
  • spacefill
  • show_cell – whether to show the frame or not (default: True)
  • camera – ‘perspective’ or ‘orthographic’
  • particle_size
  • background
  • color_scheme – v.i.
  • custom_array – color for each atom according to the array value
  • custom_3darray – vectors for each atom according to the array values (3 values for each atom)
  • select_atoms – atoms to show (1d array with ID’s or True for atoms to show)
  • color schemes (Possible) – ” “, “picking”, “random”, “uniform”, “atomindex”, “residueindex”, “chainindex”, “modelindex”, “sstruc”, “element”, “resname”, “bfactor”, “hydrophobicity”, “value”, “volume”, “occupancy”

Returns:

plot3d_ase(spacefill=True, show_cell=True, camera='perspective', particle_size=0.5, background='white', color_scheme='element', show_axes=True)[source]
Possible color schemes:
” “, “picking”, “random”, “uniform”, “atomindex”, “residueindex”, “chainindex”, “modelindex”, “sstruc”, “element”, “resname”, “bfactor”, “hydrophobicity”, “value”, “volume”, “occupancy”

Returns:

pop(i=-1)[source]

Remove and return atom at index i (default last).

Parameters:i

Returns:

pos_xyz()[source]

Returns:

positions

A size Nx3 array of the absolute coordinates of the structure which has N atoms

Type:numpy.ndarray
refine_cell(symprec=1e-05, angle_tolerance=-1.0)[source]
Parameters:
  • symprec
  • angle_tolerance

Returns:

https://atztogo.github.io/spglib/python-spglib.html

repeat(rep)[source]

Create new repeated atoms object.

The rep argument should be a sequence of three positive integers like (2,3,1) or a single integer (r) equivalent to (r,r,r).

reset_absolute(is_absolute)[source]
rotate(vector, angle=None, center=(0, 0, 0), rotate_cell=False, index_list=None)[source]

Rotate atoms based on a vector and an angle, or two vectors. This function is completely adopted from ASE code (https://wiki.fysik.dtu.dk/ase/_modules/ase/atoms.html#Atoms.rotate)

Parameters:
  • rotate_cell
  • center
  • vector (list/numpy.ndarray/string) – Vector to rotate the atoms around. Vectors can be given as strings: ‘x’, ‘-x’, ‘y’, … .
  • angle (float/list) – Angle that the atoms is rotated around the vecor ‘v’. If an angle is not specified, the length of ‘v’ is used as the angle (default). The angle can also be a vector and then ‘v’ is rotated into ‘a’.
  • = [0, 0, 0] (center) – The center is kept fixed under the rotation. Use ‘COM’ to fix the center of mass, ‘COP’ to fix the center of positions or ‘COU’ to fix the center of cell.
  • = False (rotate_cell) – If true the cell is also rotated.
  • index_list (list/numpy.ndarray) – Indices of atoms to be rotated

Examples:

Rotate 90 degrees around the z-axis, so that the x-axis is rotated into the y-axis:

>>> atoms = Atoms('H', [[-0.1, 1.01, -0.5]], cell=[[1, 0, 0], [0, 1, 0], [0, 0, 4]], pbc=[1, 1, 0])
>>> a = (22./ 7.) / 2. # pi/2
>>> atoms.rotate('z', a)
>>> atoms.rotate((0, 0, 1), a)
>>> atoms.rotate('-z', -a)
>>> atoms.rotate((0, 0, a))
>>> atoms.rotate('x', 'y')
rotate_euler(center=(0, 0, 0), phi=0.0, theta=0.0, psi=0.0)[source]

Rotate atoms via Euler angles.

See e.g http://mathworld.wolfram.com/EulerAngles.html for explanation.

Parameters:

center :
The point to rotate about. a sequence of length 3 with the coordinates, or ‘COM’ to select the center of mass, ‘COP’ to select center of positions or ‘COU’ to select center of cell.
phi :
The 1st rotation angle around the z axis.
theta :
Rotation around the x axis.
psi :
2nd rotation around the z axis.
scaled_pos_xyz()[source]

Returns:

scaled_positions

A size Nx3 array of the scaled (relative) coordinates of the structure which has N atoms

Type:numpy.ndarray
select_index(el)[source]

Returns the indices of a given element in the structure

Parameters:el (str/atomistics.structures.periodic_table.ChemicalElement) – Element for which the indices should be returned
Returns:An array of indices of the atoms of the given element
Return type:numpy.ndarray
select_parent_index(el)[source]

Returns the indices of a given element in the structure ignoring user defined elements

Parameters:el (str/atomistics.structures.periodic_table.ChemicalElement) – Element for which the indices should be returned
Returns:An array of indices of the atoms of the given element
Return type:numpy.ndarray
set_absolute()[source]
set_array(name, a, dtype=None, shape=None)[source]

Update array. This function is for the purpose of compatibility with the ASE package

Parameters:
  • name (str) – Name of the array
  • a (list/numpy.ndarray) – The array to be added
  • dtype (type) – Data type of the array
  • shape (list/turple) – Shape of the array
set_cell(cell, scale_atoms=False)[source]

Set unit cell vectors.

Parameters:

cell: 3x3 matrix or length 3 or 6 vector
Unit cell. A 3x3 matrix (the three unit cell vectors) or just three numbers for an orthorhombic cell. Another option is 6 numbers, which describes unit cell with lengths of unit cell vectors and with angles between them (in degrees), in following order: [len(a), len(b), len(c), angle(b,c), angle(a,c), angle(a,b)]. First vector will lie in x-direction, second in xy-plane, and the third one in z-positive subspace.
scale_atoms: bool
Fix atomic positions or move atoms with the unit cell? Default behavior is to not move the atoms (scale_atoms=False).

Examples:

Two equivalent ways to define an orthorhombic cell:

>>> atoms = Atoms('He')
>>> a, b, c = 7, 7.5, 8
>>> atoms.set_cell([a, b, c])
>>> atoms.set_cell([(a, 0, 0), (0, b, 0), (0, 0, c)])

FCC unit cell:

>>> atoms.set_cell([(0, b, b), (b, 0, b), (b, b, 0)])

Hexagonal unit cell:

>>> atoms.set_cell([a, a, c, 90, 90, 120])

Rhombohedral unit cell:

>>> alpha = 77
>>> atoms.set_cell([a, a, a, alpha, alpha, alpha])
set_constraint(constrain)[source]
set_initial_magnetic_moments(magmoms)[source]

Set array of initial magnetic moments.

Parameters:magmoms (numpy.array()) –
set_pbc(value)[source]

Sets the perioic boundary conditions on all three axis

Parameters:value (numpy.ndarray/list) – An array of bool type with length 3
set_positions(positions)[source]

Set positions. This function is for compatability with ASE

Parameters:positions (numpy.ndarray/list) – Positions in absolute coordinates
set_relative()[source]
set_repeat(vec)[source]
set_scaled_positions(scaled)[source]

Set positions relative to unit cell.

Parameters:scaled (numpy.ndarray/list) – The relative coordinates
set_species(value)[source]

Setting the species list

Parameters:value (list) – A list atomistics.structure.periodic_table.ChemicalElement instances
species

A list of atomistics.structure.periodic_table.ChemicalElement instances

Type:list
to_hdf(hdf, group_name='structure')[source]

Save the object in a HDF5 file

Parameters:
  • hdf (pyiron.base.generic.hdfio.FileHDFio) – HDF path to which the object is to be saved
  • group_name (str) – Group name with which the object should be stored. This same name should be used to retrieve the object
translate(displacement)[source]

Translate atomic positions.

The displacement argument can be a float, an xyz vector, or an nx3 array (where n is the number of atoms).

Parameters:displacement

Returns:

wrap(center=(0.5, 0.5, 0.5), pbc=None, eps=1e-07)[source]

Wrap positions to unit cell.

Parameters:

center: three float
The positons in fractional coordinates that the new positions will be nearest possible to.
pbc: one or 3 bool
For each axis in the unit cell decides whether the positions will be moved along this axis. By default, the boundary conditions of the Atoms object will be used.
eps: float
Small number to prevent slightly negative coordinates from beeing wrapped.

See also the ase.utils.geometry.wrap_positions() function. Example:

>>> a = Atoms('H',
...           [[-0.1, 1.01, -0.5]],
...           cell=[[1, 0, 0], [0, 1, 0], [0, 0, 4]],
...           pbc=[1, 1, 0])
>>> a.wrap()
>>> a.positions
array([[ 0.9 ,  0.01, -0.5 ]])
write(filename, format=None, **kwargs)[source]

Write atoms object to a file.

see ase.io.write for formats. kwargs are passed to ase.io.write.

Parameters:
  • filename
  • format
  • **kwargs

Returns:

class pyiron.atomistics.structure.atoms.CrystalStructure[source]

Bases: object

class pyiron.atomistics.structure.atoms.Neighbors[source]

Bases: object

Class for storage of the neighbor information for a given atom based on the KDtree algorithm

distances
indices
shells
vecs
pyiron.atomistics.structure.atoms.ase_to_pyiron(ase_obj)[source]
Parameters:ase_obj

Returns:

pyiron.atomistics.structure.atoms.default(data, dflt)[source]

Helper function for setting default values.

Parameters:
  • data
  • dflt

Returns:

pyiron.atomistics.structure.atoms.ovito_to_pyiron(ovito_obj)[source]
Parameters:ovito_obj

Returns:

pyiron.atomistics.structure.atoms.pyiron_to_ase(pyiron_obj)[source]
pyiron.atomistics.structure.atoms.pyiron_to_ovito(atoms)[source]
Parameters:atoms

Returns:

pyiron.atomistics.structure.atoms.pyiron_to_pymatgen(pyiron_obj)[source]
pyiron.atomistics.structure.atoms.pymatgen_to_pyiron(pymatgen_obj)[source]
pyiron.atomistics.structure.atoms.string2symbols(s)[source]

Convert string to list of chemical symbols.

Parameters:s

Returns:

pyiron.atomistics.structure.atoms.string2vector(v)[source]
Parameters:v

Returns:

pyiron.atomistics.structure.atoms.symbols2numbers(symbols)[source]
Parameters:symbols (list, str) –

Returns:

pyiron.atomistics.structure.ovito module

pyiron.atomistics.structure.periodic_table module

class pyiron.atomistics.structure.periodic_table.ChemicalElement(sub)[source]

Bases: object

An Object which contains the element specific parameters

add_tags(tag_dic)[source]

Add tags to an existing element inside its specific panda series without overwriting the old tags

Parameters:tag_dic (dict) – dictionary containing e.g. key = “spin” value = “up”, more than one tag can be added at once
from_hdf(hdf)[source]

loads an element with his parameters from the hdf5 job file and store it into its specific pandas series :param hdf: Hdfio object which will be used to read a hdf5 file :type hdf: Hdfio

tags
to_hdf(hdf)[source]

saves the element with his parameters into his hdf5 job file :param hdf: Hdfio object which will be used :type hdf: Hdfio

class pyiron.atomistics.structure.periodic_table.ElementColorDictionary[source]

Bases: object

elementColors = {'Ac': [89, 112, 171, 250, 255], 'Ag': [47, 192, 192, 192, 255], 'Al': [13, 191, 166, 166, 255], 'Am': [95, 84, 92, 242, 255], 'Ar': [18, 128, 209, 227, 255], 'As': [33, 189, 128, 227, 255], 'At': [85, 117, 79, 69, 255], 'Au': [79, 255, 209, 35, 255], 'B': [5, 255, 181, 181, 255], 'Ba': [56, 0, 201, 0, 255], 'Be': [4, 194, 255, 0, 255], 'Bh': [107, 224, 0, 56, 255], 'Bi': [83, 158, 79, 181, 255], 'Bk': [97, 138, 79, 227, 255], 'Br': [35, 166, 41, 41, 255], 'C': [6, 144, 144, 144, 255], 'Ca': [20, 61, 255, 0, 255], 'Cd': [48, 255, 217, 143, 255], 'Ce': [58, 255, 255, 199, 255], 'Cf': [98, 161, 54, 212, 255], 'Cl': [17, 31, 240, 31, 255], 'Cm': [96, 120, 92, 227, 255], 'Co': [27, 240, 144, 160, 255], 'Cr': [24, 138, 153, 199, 255], 'Cs': [55, 87, 23, 143, 255], 'Cu': [29, 200, 128, 51, 255], 'Db': [105, 209, 0, 79, 255], 'Dy': [66, 31, 255, 199, 255], 'Er': [68, 0, 230, 117, 255], 'Es': [99, 179, 31, 212, 255], 'Eu': [63, 97, 255, 199, 255], 'F': [9, 144, 224, 80, 255], 'Fe': [26, 224, 102, 51, 255], 'Fm': [100, 179, 31, 186, 255], 'Fr': [87, 66, 0, 102, 255], 'Ga': [31, 194, 143, 143, 255], 'Gd': [64, 69, 255, 199, 255], 'Ge': [32, 102, 143, 143, 255], 'H': [1, 255, 255, 255, 255], 'He': [2, 217, 255, 255, 255], 'Hf': [72, 77, 194, 255, 255], 'Hg': [80, 184, 184, 208, 255], 'Ho': [67, 0, 255, 156, 255], 'Hs': [108, 230, 0, 46, 255], 'I': [53, 148, 0, 148, 255], 'In': [49, 166, 117, 115, 255], 'Ir': [77, 23, 84, 135, 255], 'K': [19, 143, 64, 212, 255], 'Kr': [36, 92, 184, 209, 255], 'La': [57, 112, 212, 255, 255], 'Li': [3, 204, 128, 255, 255], 'Lr': [103, 199, 0, 102, 255], 'Lu': [71, 0, 171, 36, 255], 'Md': [101, 179, 13, 166, 255], 'Mg': [12, 138, 255, 0, 255], 'Mn': [25, 156, 122, 199, 255], 'Mo': [42, 84, 181, 181, 255], 'Mt': [109, 235, 0, 38, 255], 'N': [7, 48, 80, 248, 255], 'Na': [11, 171, 92, 242, 255], 'Nb': [41, 115, 194, 201, 255], 'Nd': [60, 199, 255, 199, 255], 'Ne': [10, 179, 227, 245, 255], 'Ni': [28, 80, 208, 80, 255], 'No': [102, 189, 13, 135, 255], 'Np': [93, 0, 128, 255, 255], 'O': [8, 255, 13, 13, 255], 'Os': [76, 38, 102, 150, 255], 'P': [15, 255, 128, 0, 255], 'Pa': [91, 0, 161, 255, 255], 'Pb': [82, 87, 89, 97, 255], 'Pd': [46, 0, 105, 133, 255], 'Pm': [61, 163, 255, 199, 255], 'Po': [84, 171, 92, 0, 255], 'Pr': [59, 217, 255, 199, 255], 'Pt': [78, 208, 208, 224, 255], 'Pu': [94, 0, 107, 255, 255], 'Ra': [88, 0, 125, 0, 255], 'Rb': [37, 112, 46, 176, 255], 'Re': [75, 38, 125, 171, 255], 'Rf': [104, 204, 0, 89, 255], 'Rh': [45, 10, 125, 140, 255], 'Rn': [86, 66, 130, 150, 255], 'Ru': [44, 36, 143, 143, 255], 'S': [16, 255, 255, 48, 255], 'Sb': [51, 158, 99, 181, 255], 'Sc': [21, 230, 230, 230, 255], 'Se': [34, 255, 161, 0, 255], 'Sg': [106, 217, 0, 69, 255], 'Si': [14, 240, 200, 160, 255], 'Sm': [62, 143, 255, 199, 255], 'Sn': [50, 102, 128, 128, 255], 'Sr': [38, 0, 255, 0, 255], 'Ta': [73, 77, 166, 255, 255], 'Tb': [65, 48, 255, 199, 255], 'Tc': [43, 59, 158, 158, 255], 'Te': [52, 212, 122, 0, 255], 'Th': [90, 0, 186, 255, 255], 'Ti': [22, 191, 194, 199, 255], 'Tl': [81, 166, 84, 77, 255], 'Tm': [69, 0, 212, 82, 255], 'U': [92, 0, 143, 255, 255], 'V': [23, 166, 166, 171, 255], 'W': [74, 33, 148, 214, 255], 'Xe': [54, 66, 158, 176, 255], 'Y': [39, 148, 255, 255, 255], 'Yb': [70, 0, 191, 56, 255], 'Zn': [30, 125, 128, 176, 255], 'Zr': [40, 148, 224, 224, 255]}
to_lut()[source]

Returns:

class pyiron.atomistics.structure.periodic_table.PeriodicTable(file_name=None)[source]

Bases: object

An Object which stores an elementary table which can be modified for the current session

add_element(parent_element, new_element, use_parent_potential=False, **qwargs)[source]

Add “additional” chemical elements to the Periodic Table. These can be used to distinguish between the various potentials which may exist for a given species or to introduce artificial elements such as pseudohydrogen. For this case set use_parent_potential = False and add in the directory containing the potential files a new file which is derived from the name new element.

This function may be also used to provide additional information for the identical chemical element, e.g., to define a Fe_up and Fe_down to perform the correct symmetry search as well as initialization.

Parameters:
  • parent_element (str) – name of parent element
  • new_element (str) – name of new element
  • use_parent_potential – True: use the potential from the parent species
  • **qwargs – define tags and their values, e.g. spin = “up”, relax = [True, True, True]

Returns: new element (ChemicalElement)

atomic_number_to_abbreviation(atom_no)[source]
Parameters:atom_no

Returns:

element(arg, **qwargs)[source]

The method searches through the periodic table. If the table contains the element, it will return an Object of the type ChemicalElement containing all parameters from the periodic table. The option **qwargs allows a direct modification of the tag-values during the creation process :param arg: sort of element :type arg: str, ChemicalElement :param **qwargs: e.g. a dictionary of tags

Returns element (ChemicalElement): a element with all its properties (Abbreviation, AtomicMass, Weight, …)

from_hdf(hdf)[source]

loads an element with his parameters from the hdf5 job file by creating an Object of the ChemicalElement type. The new element will be stored in the current periodic table. Changes in the tags will also be modified inside the periodic table.

Parameters:hdf (Hdfio) – Hdfio object which will be used to read the data from a hdf5 file

Returns:

is_element(symbol)[source]

Compares the Symbol with the Abbreviations of elements inside the periodic table :param symbol: name of element, str :type symbol: str

Returns boolean: true for the same element, false otherwise

pyiron.atomistics.structure.phonopy module

pyiron.atomistics.structure.phonopy.analyse_phonopy_equivalent_atoms(atoms, symprec=1e-05, angle_tolerance=-1.0)[source]
Args: (read phonopy.structure.spglib for more details)
symprec:
float: Symmetry search tolerance in the unit of length.
angle_tolerance:
float: Symmetry search tolerance in the unit of angle deg.
If the value is negative, an internally optimized routine is used to judge symmetry.

pyiron.atomistics.structure.pyironase module

pyiron.atomistics.structure.sparse_list module

class pyiron.atomistics.structure.sparse_list.SparseArray(length=None, **qwargs)[source]

Bases: object

Administrate object that consists of several sparse lists (tags) and full lists that have identical indices and length

Parameters:**qwargs – dictionary containing lists and SparseLists (tags) (must have identical length)
add_tag(*args, **qwargs)[source]
check_consistency()[source]

Returns:

items()[source]

Returns:

keys()[source]

Returns:

remove_tag(*args, **qwargs)[source]
Parameters:
  • *args
  • **qwargs

Returns:

class pyiron.atomistics.structure.sparse_list.SparseArrayElement(**qwargs)[source]

Bases: object

Single element of a SparseArray :param **qwargs:

class pyiron.atomistics.structure.sparse_list.SparseList(sparse_list, default=None, length=None)[source]

Bases: object

Object to represent a single sparse list Internal representation like a dict External representation like a list :param sparse_list: dict object with {index: val} :param default: default value for all elements not given by index in sparse_list :param length: length of the list

items()[source]
Returns:index, value pairs of non-sparse elements
keys()[source]
Returns:indices of non-sparse elements
list()[source]

convert sparse list into full list :returns: list representation

to_hdf(hdf, key)[source]
Parameters:
  • hdf
  • key

Returns:

values()[source]
Returns:values of non-sparse elements
class pyiron.atomistics.structure.sparse_list.SparseListElement(ind, val)[source]

Bases: object

Handle single element of a sparse lisr :param ind: index :param val: value

pyiron.atomistics.structure.sparse_list.sparse_index(index_list, length, default_val=True)[source]
Parameters:
  • index_list
  • length
  • default_val

Returns:

Module contents