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:
objectStorage 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
elementattribute. 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
labelfor referring to this Atom. By default an empty string. - occupancy (float, optional) – The initial
occupancyof this atom, by default1. - anisotropy (bool, optional) – The flag for anisotropic thermal displacements parameters.
This overrides
anisotropyimplied by presence of the U or Uisoequiv arguments. Defaults toFalsewhen not set in any other way. - U (ndarray, optional) – The 3x3 matrix of anisotropic thermal displacement parameters.
When present
anisotropydefaults toTrue. - Uisoequiv (float, optional) – The isotropic atomic displacement parameter. The
anisotropydefaults toFalsewhen 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 whenNone.
-
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
Structureobject.Type: str
-
lattice¶ Coordinate system for the fractional coordinates
xyzand the tensor of atomic displacement parametersU. Use the absolute Cartesian coordinates whenNone.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.
-
xyz_cartn¶ Atom position in absolute Cartesian coordinates.
This is computed from fractional coordinates
xyzand the currentlatticesetup. Assignment to xyz_cartn or its components is applied on fractional coordinatesxyz.Type: ndarray
-
anisotropy¶ Flag for allowing anisotropic displacement parameters.
When
Falsethe tensor of thermal displacement parametersUmust 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
anisotropyisFalse) assignment to U uses only the firstUnew[0, 0]element and the remaining components of U are adjusted to obtain isotropic tensor in the activelattice.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 theU11,U22, …, orB11,B22, …, descriptors to set only some U components.Type: ndarray
-
U11¶ The
U[0, 0]component of the displacement tensorU.When
anisotropyisFalsesetting a new value updates entire tensor U.Type: float
-
U22¶ The
U[1, 1]component of the displacement tensorU.When
anisotropyisFalsesetting a new value updates entire tensor U.Type: float
-
U33¶ The
U[2, 2]component of the displacement tensorU.When
anisotropyisFalsesetting a new value updates entire tensor U.Type: float
-
U12¶ The
U[0, 1]element of the displacement tensorU.Sets
U[1, 0]together withU[0, 1]. Assignment has no effect whenanisotropyisFalse.Type: float
-
U13¶ The
U[0, 2]element of the displacement tensorU.Sets
U[2, 0]together withU[0, 2]. Assignment has no effect whenanisotropyisFalse.Type: float
-
U23¶ The
U[1, 2]element of the displacement tensorU.Sets
U[2, 1]together withU[1, 2]. Assignment has no effect whenanisotropyisFalse.Type: float
-
Uisoequiv¶ The isotropic displacement parameter or an equivalent value.
Setting a new value rescales tensor
Uso it yields equivalent direction-averaged displacements.Type: float
-
B11¶ The
B11element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U11. WhenanisotropyisFalsesetting a new value updates entire tensorU.Type: float
-
B22¶ The
B22element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U22. WhenanisotropyisFalsesetting a new value updates entire tensorU.Type: float
-
B33¶ The
B33element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U33. WhenanisotropyisFalsesetting a new value updates entire tensorU.Type: float
-
B12¶ The
B12element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U12. Setting a new value updatesUin a symmetric way. Assignment has no effect whenanisotropyisFalse.Type: float
-
B13¶ The
B13element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U13. Setting a new value updatesUin a symmetric way. Assignment has no effect whenanisotropyisFalse.Type: float
-
B23¶ The
B23element of the Debye-Waller matrix.This is equivalent to
8 * pi**2 * U23. Setting a new value updatesUin a symmetric way. Assignment has no effect whenanisotropyisFalse.Type: float
- atype (str or Atom, optional) – The string atom type to be set as the