pyspinw.lattice_distances#
Calculations for finding distances between sites in a lattice
Functions
Demonstrate the calculation of the calculation of cells for searching in |
|
|
Find fractional coordinates from translations of the unit cell close to the origin. |
|
List of unit cell translations so that cells cover a sphere of the specified radius |
|
Partial list of unit cell translations so that cells cover a sphere of the specified radius |
Classes
|
Holds the output from the algorithm to find relative positions |
- class pyspinw.lattice_distances.InteractionGeometries(cell_indices: ndarray, vectors: ndarray, distances: ndarray)#
Bases:
objectHolds the output from the algorithm to find relative positions
- cell_indices: ndarray#
Indices of the cells where a point was found at a sufficiently close distance
- distances: ndarray#
Distance to the each point
- expand() list[tuple[ndarray, ndarray, ndarray]]#
Create a list of tuples from the data in this object
- vectors: ndarray#
Vectors for each position found
- pyspinw.lattice_distances.demo_point_finding()#
Demonstrate the calculation of the calculation of cells for searching in
- pyspinw.lattice_distances.find_relative_positions(fractional_coordinates: ndarray, unit_cell_transform: ndarray, max_distance: float, tol: float = 1e-10, is_self_interaction=True) InteractionGeometries#
Find fractional coordinates from translations of the unit cell close to the origin.
Find all sets of fractional coordinates produced by translations of input coordinates by multiples of the unit cell, and that differ by a cartesian distance of a most max_distance from (0,0,0)
- Parameters:
fractional_coordinates – Fractional coordinates of the base point
unit_cell_transform – Transform from fractional coordinates to cartesian coordinates
max_distance – Maximum distance
tol – tolerance used to check for identity
is_self_interaction – include the original point with no translation (i,j,k = 0,0,0)
- pyspinw.lattice_distances.full_search_space(unit_cell_transform: ndarray, radius: float) ndarray#
List of unit cell translations so that cells cover a sphere of the specified radius
- Parameters:
unit_cell_transform – transformation from fractional coordinates to cartesian coordinates
radius – maximum radius
- pyspinw.lattice_distances.partial_search_space(unit_cell_transform: ndarray, radius: float) ndarray#
Partial list of unit cell translations so that cells cover a sphere of the specified radius
Only one representation from each pair where (a,b,c) = (-p,-q,-r)
- Parameters:
unit_cell_transform – transformation from fractional coordinates to cartesian coordinates
radius – maximum radius