viperleed.calc.classes.atom.Atom

class viperleed.calc.classes.atom.Atom(el, pos, num, slab)[source]

Class storing information about a single atom.

el

Element type

Type:

str

pos

Atom position as fractional coordinate

Type:

numpy.ndarray

num

A progressive number identifying this atom. Normally, it would be the atom number in the POSCAR (i.e., the VESTA progressive, non-element-specific number).

Type:

int

slab

The Slab that the atom belongs to.

Type:

Slab

layer

Layer object that the atom belongs to (if any).

Type:

Layer or None

site

Site type of the atom, containing vibrational amplitude and occupation. Supplied by the SITE_DEF parameter, assigned by the initSites method of Slab.

Type:

Sitetype or None

cartpos

Position in Cartesian coordinates, with the highest atom at z = 0, positive z pointing into the surface

Type:

numpy.ndarray

Defines to which other atoms this Atom is linked. Notice that if this Atom is linked to another one, the linklist of both are the same object, i.e., there is only one linklist shared by all atoms in the same group. This is used together with symrefm to determine symmetry-conserving displacements.

Type:

list of Atom

displist

Like linklist, but keeps track of which symmetry was active when displacement was defined.

Type:

list of Atom

freedir

Defines whether the atom can be moved or is locked by symmetry. 0: no movements, 1: completely free, np.array([0|1, 0|1|-1]): parallel movement to a, b, or diagonal

Type:

int or numpy.ndarray

symrefm

Defines how a translation of the atom at self.linklist[0] should be transformed to affect this atom.

Type:

numpy.ndarray

disp_vib, disp_geo, disp_occ

Keys are elements, values are lists of vibration/geometry/ occupation offsets

Type:

dict

disp_geo_offset

Keys are elements; values are also formatted as lists for convenience, but should be one element long.

Type:

dict

disp_center_index

Which index in the displacement range corresponds to ‘no change’

Type:

dict of dict

dispInitialized

disp_* variables get initialized after readVIBROCC by Atom.initDisp

Type:

bool

known_deltas

Filenames of delta files generated or found for this atom

Type:

list of str

offset_geo, offset_vib, offset_occ

Offsets from self.cartpos, self.site.vib, self.site.occ per element

Type:

dict

constraints

Parameter constraints for restrict.f per element, where 1, 2, 3 = geo, vib, occ. Can be integer-valued index in disp_* range or a tuple (atom, element)

Type:

dict

oriState

Deep copy of self before a search is applied

Type:

Atom

duplicate_of

If this atom is identical to another one by translational symmetry (through SYMMETRY_CELL_TRANSFORM or domain supercell creation), this points to the atom in the base cell.

Type:

Atom

__init__(el, pos, num, slab)[source]

Initialize instance.

Methods

__init__(el, pos, num, slab)

Initialize instance.

assignConstraint(mode[, targetel, value, ...])

Assign a displacement constraint to this atom.

assignDisp(mode, disprange[, targetel, ...])

Assigns a list of displacements to this atom, for all or a given element.

clearOffset(mode[, targetel, primary, displist])

Revert an offset for self and all its symmetry-equivalent atoms.

copyOriState(other)

Deepcopy positions and offsets from another atom into oriState.

duplicate([add_to_atlists, num])

Return a somewhat lightweight copy of this Atom.

initDisp([force])

Initialize displacement dictionaries based on self.site.

is_same_xy(cartpos[, eps])

Return whether this atom is close to a 2D cartpos.

mergeDisp(el)

Merges the offsets from VIBROCC and DISPLACEMENTS into the displacements lists from DISPLACEMENTS for the given element.

storeOriState()

Stores the initial values from the input files for this atom.

translate_2d(cart_shift, frac_shift)

Apply a 2D translation to this Atom.

Attributes

is_bulk

Return whether this Atom is in a bulk layer.