exatomic.core.field module

Atomic Field

Essentially a Field3D used for storing cube file data (see cube). Cube files values are written in a csv-like structure with the outer loop going over the x dimension, the middle loop going over the y dimension, and the inner loop going over the z dimension.

class exatomic.core.field.AtomicField(*args, **kwargs)[source]

Bases: Field

Class for storing exatomic cube data (scalar field of 3D space). Note that this class follows the pattern established by the cube file format.

Note

Supports any shape “cube”.

property nfields
compute_final()[source]
compute_dv()[source]

Compute the volume element for each field.

Volume of a parallelpiped whose dimensions are \(\mathbf{a}\), \(\mathbf{b}\), \(\mathbf{c}\) is given by:

\[v = \left|\mathbf{a}\cdot\left(\mathbf{b}\times\mathbf{c}\right)\right|\]
integrate()[source]

Check that field values are normalized.

Computes the integral of the field values. For normalized fields (e.g orbitals), the result should be 1.

\[\int\left|\phi_{i}\right|^{2}dV \equiv 1\]
rotate(a, b, angle)[source]

Unitary transformation of the discrete field.

newfield = uni.field.rotate(0, 1, np.pi / 2)  # returns an :class:`~exatomic.core.field.AtomicField`
uni.add_field(newfield)                       # appends new fields to :class:`~exatomic.core.universe.Universe`
Parameters:
  • a (int) – Index of first field

  • b (int) – Index of second field

  • angle (float or list of floats) – angle(s) of rotation (in radians)

Returns:

rotated (AtomicField) – positive then negative linear combinations