qem.atomic_column
Functions
|
Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. |
|
Return an object to identify dataclass fields. |
Classes
|
A class to represent atomic columns projected from a 3D atomic lattice onto a 2D plane. |
- class qem.atomic_column.AtomicColumns(lattice: ase.Atoms, lattice_ref: ase.Atoms, elements: ~typing.List[str] = <factory>, tol: float = 0, pixel_size: float = 0.1, reference: ~typing.Dict[str, numpy.ndarray] = <factory>)[source]
A class to represent atomic columns projected from a 3D atomic lattice onto a 2D plane.
- Variables:
lattice (
Atoms
) – The 3D atomic lattice.lattice_ref (
Atoms
) – The reference 3D atomic lattice.elements (
List[str]
) – List of element symbols.tol (
float
) – Tolerance for the projection.pixel_size (
float
) – Size of each pixel.projection_params (
Dict[str, np.ndarray]
) – Dictionary containing origin, vector_a, and vector_b for projection.
- lattice: ase.Atoms
- lattice_ref: ase.Atoms
- reference: Dict[str, numpy.ndarray]
- get_columns()[source]
project the 3d atomic lattice onto the 2d plane in z direction and return the unique atomic columns
- Parameters:
tol (
float
) – tolerance for the projection, within which the atoms are considered to be in the same column- Returns:
coords_2d (np.ndarray) – 2d coordinates of the atomic columns atomic_numbers (np.ndarray): atomic numbers of the atoms in the atomic columns
- get_columns_ref()[source]
project the 3d atomic lattice onto the 2d plane in z direction and return the unique atomic columns
- Parameters:
tol (
float
) – tolerance for the projection, within which the atoms are considered to be in the same column- Returns:
coords_2d (np.ndarray) – 2d coordinates of the atomic columns atomic_numbers (np.ndarray): atomic numbers of the atoms in the atomic columns
- get_local_displacement(cutoff: float, units='pixel') numpy.ndarray [source]
Return an array of local displacements.
- get_column_displacement(units='pixel') numpy.ndarray [source]
Return the displacement of the column.
- property positions_pixel: numpy.ndarray
Return an array of positions.
- property positions_pixel_ref: numpy.ndarray
- property x: numpy.ndarray
Return an array of x coordinates.
- property y: numpy.ndarray
Return an array of y coordinates.
- property x_ref: numpy.ndarray
Return an array of x_ref coordinates.
- property y_ref: numpy.ndarray
Return an array of y_ref coordinates.
- property atomic_numbers: numpy.ndarray
Return an array of atom types.
- property atom_types: numpy.ndarray
Return a numpy array of atom types.
- get_strain_xy(cutoff: float = 0) numpy.ndarray [source]
Return the strain matrix.
- get_strain(cutoff: float = 3.0) numpy.ndarray [source]
Return the strain tensor.