diffpy.structure.atom

Provide class Atom for managing properties of an atom in structure model.

class Atom(atype=None, xyz=None, label=None, occupancy=None, anisotropy=None, U=None, Uisoequiv=None, lattice=None)

Bases: object

Storage of structure information relevant for a single atom.

This class manages atom information such as element symbol, position in fractional and Cartesian coordinates, atomic displacement parameters and so forth.

Parameters:
  • atype (str or Atom, optional) – The string atom type to be set as the element attribute. By default an empty string. When of the Atom type, create a copy of atype and adjust it per other arguments.
  • xyz (ndarray, optional) – Fractional coordinates within the associated lattice. By default [0, 0, 0].
  • label (str, optional) – A unique string label for referring to this Atom. By default an empty string.
  • occupancy (float, optional) – The initial occupancy of this atom, by default 1.
  • anisotropy (bool, optional) – The flag for anisotropic thermal displacements parameters. This overrides anisotropy implied by presence of the U or Uisoequiv arguments. Defaults to False when not set in any other way.
  • U (ndarray, optional) – The 3x3 matrix of anisotropic thermal displacement parameters. When present anisotropy defaults to True.
  • Uisoequiv (float, optional) – The isotropic atomic displacement parameter. The anisotropy defaults to False when present. Only one of the U and Uisoequiv arguments may be provided at the same time. Assume zero atomic displacements when U and Uisoequiv are unset.
  • lattice (Lattice) – Coordinate system for the fractional coordinates xyz. Use the absolute Cartesian system when None.
element

The string type of the atom. An element or ion symbol.

Type:str
xyz

The fractional coordinates in the associated lattice.

Type:ndarray
label

A unique string label referring to this atom, for example, “C_1”. The label can be used to reference this atom when contained in a Structure object.

Type:str
occupancy

The fractional occupancy of this atom.

Type:float
lattice

Coordinate system for the fractional coordinates xyz and the tensor of atomic displacement parameters U. Use the absolute Cartesian coordinates when None.

Type:Lattice
element = ''
label = ''
occupancy = 1.0
lattice = None
msdLat(vl)

Calculate mean square displacement along the lattice vector.

Parameters:vl (array_like) – The vector in lattice coordinates.
Returns:float – The mean square displacement along vl.
msdCart(vc)

Calculate mean square displacement along the Cartesian vector.

Parameters:vc (array_like) – Vector in Cartesian coordinates.
Returns:float – The mean square displacement along vc.
x

fractional coordinate x, same as xyz[0].

Type:float
y

fractional coordinate y, same as xyz[1].

Type:float
z

fractional coordinate z, same as xyz[2].

Type:float
xyz_cartn

Atom position in absolute Cartesian coordinates.

This is computed from fractional coordinates xyz and the current lattice setup. Assignment to xyz_cartn or its components is applied on fractional coordinates xyz.

Type:ndarray
anisotropy

Flag for allowing anisotropic displacement parameters.

When False the tensor of thermal displacement parameters U must be isotropic and only its diagonal elements are taken into account.

Type:bool
U

The 3x3 matrix of anisotropic atomic displacements.

For isotropic displacements (when anisotropy is False) assignment to U uses only the first Unew[0, 0] element and the remaining components of U are adjusted to obtain isotropic tensor in the active lattice.

Note

Elements of the U tensor such as U[0, 1] should be considered read-only as setting them directly leads to undefined behavior. Use the U11, U22, …, or B11, B22, …, descriptors to set only some U components.

Type:ndarray
U11

The U[0, 0] component of the displacement tensor U.

When anisotropy is False setting a new value updates entire tensor U.

Type:float
U22

The U[1, 1] component of the displacement tensor U.

When anisotropy is False setting a new value updates entire tensor U.

Type:float
U33

The U[2, 2] component of the displacement tensor U.

When anisotropy is False setting a new value updates entire tensor U.

Type:float
U12

The U[0, 1] element of the displacement tensor U.

Sets U[1, 0] together with U[0, 1]. Assignment has no effect when anisotropy is False.

Type:float
U13

The U[0, 2] element of the displacement tensor U.

Sets U[2, 0] together with U[0, 2]. Assignment has no effect when anisotropy is False.

Type:float
U23

The U[1, 2] element of the displacement tensor U.

Sets U[2, 1] together with U[1, 2]. Assignment has no effect when anisotropy is False.

Type:float
Uisoequiv

The isotropic displacement parameter or an equivalent value.

Setting a new value rescales tensor U so it yields equivalent direction-averaged displacements.

Type:float
B11

The B11 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U11. When anisotropy is False setting a new value updates entire tensor U.

Type:float
B22

The B22 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U22. When anisotropy is False setting a new value updates entire tensor U.

Type:float
B33

The B33 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U33. When anisotropy is False setting a new value updates entire tensor U.

Type:float
B12

The B12 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U12. Setting a new value updates U in a symmetric way. Assignment has no effect when anisotropy is False.

Type:float
B13

The B13 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U13. Setting a new value updates U in a symmetric way. Assignment has no effect when anisotropy is False.

Type:float
B23

The B23 element of the Debye-Waller matrix.

This is equivalent to 8 * pi**2 * U23. Setting a new value updates U in a symmetric way. Assignment has no effect when anisotropy is False.

Type:float
Bisoequiv

The Debye-Waller isotropic displacement or an equivalent value.

This equals 8 * pi**2 * Uisoequiv. Setting a new value rescales U tensor to yield equivalent direction-average of Debye-Waller displacements.

Type:float