crystals.Atom

class crystals.Atom(element: str | int | Element, coords: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], lattice: Lattice | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, displacement: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, magmom: float | None = None, occupancy: float = 1.0, tag: Any | None = None, electronic_structure: ElectronicStructure | None = None, **kwargs)

Container object for atomic data.

Parameters:
  • element (str or int) – Chemical element symbol or atomic number.

  • coords (array-like, shape (3,)) – Coordinates of the atom in fractional form.

  • lattice (Lattice or array-like, shape (3,3)) – Lattice on which the atom is positioned.

  • displacement (array-like or None, optional) – Atomic maximum displacement [Angs].

  • magmom (float, optional) – Magnetic moment. If None (default), the ground-state magnetic moment is used.

  • occupancy (float, optional) – Fractional occupancy. If None (default), occupancy is set to 1.0.

  • tag (int or None, optional) – Tag an atom with a unique identifier. Useful to keep track of atom order, for example in PWSCF output files. This is mostly for internal use.

  • electronic_structure (ElectronicStructure or None, optional) – Electronic orbital structure for this atom. If None (default), the ground state for this element will be used.

__init__(element: str | int | Element, coords: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], lattice: Lattice | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, displacement: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, magmom: float | None = None, occupancy: float = 1.0, tag: Any | None = None, electronic_structure: ElectronicStructure | None = None, **kwargs)

Methods

__array__(*args, **kwargs)

Returns an array [Z, x, y, z]

__delattr__(name, /)

Implement delattr(self, name).

__dir__()

Default dir() implementation.

__eq__(other)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(element, coords[, lattice, ...])

__init_subclass__

This method is called when a class is subclassed.

__le__(value, /)

Return self<=value.

__lt__(other)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)

__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__()

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

from_ase(atom)

Returns an Atom instance from an ASE atom

transform(*matrices)

Return an Atom with fractional coordinates transformed according to symmetry operators.

Attributes

element

coords_fractional

displacement

magmom

occupancy

lattice

electronic_structure

__annotations__

__slots__

atomic_number

Atomic number

coords_cartesian

Real-space position of the atom on the lattice, in Angstroms.

element_full

Full element name, e.g.

magnetic_moment_ground

Ground state magnetic moment.

mass

Atomic mass [u]

name

Full element name, e.g.

symbol

Elemental symbol, e.g.

valid_names

valid_symbols