sisl.geom.UniqueNeighborList
- class sisl.geom.UniqueNeighborList(geometry: Geometry, finder_results: ndarray, split_indices: ndarray | None = None)
Bases:
AtomsNeighborList
Full neighbors list of a system, but containing only the upper triangle of the adjacency matrix.
What this means, is that the the object only contains one direction of each interaction.
This is only possible if the interaction is symmetric (there is no directionality and thresholds for interaction do not depend on direction).
Examples
You can get a unique neighbors list from the find_unique_pairs method of a
NeighborFinder
object. Then, you can retreive the neighbors from it:import sisl # Build a graphene supercell with a vacancy graphene = sisl.geom.graphene().tile(2, 0).tile(2, 1) graphene = graphene.remove(2).translate2uc() # Initialize a finder for neighbors that are within 1.5 Angstrom finder = sisl.geom.NeighborFinder(graphene, R=1.5) # Get the list of unique neighbor pairs neighbors = finder.find_unique_pairs() # You can get the neighbor pairs (i,j) from the i and j attributes # The supercell index of atom J is in the isc attribute. print("ATOM I", neighbors.i) print("ATOM J (NEIGHBOR)", neighbors.j) print("NEIGHBORS ISC:", neighbors.isc) # Notice that I is always smaller than J. Each connection is only # stored once. # You can convert to a full neighbors list, which will contain both # directions. full_neighbors = neighbors.to_full()
Methods
to_full
()Converts the unique neighbors list to a full neighbors list.
Attributes
For each neighbor pair (i, j), the first index.
For each neighbor pair (i, j), the supercell indices of
j
.For each neighbor pair (i, j), the second index.
The minimum nsc for an auxiliary supercell to contain all neighbors in this object.
Number of neighbors that each atom has.
Indices to split the interactions of each atom.
- to_full() FullNeighborList [source]
Converts the unique neighbors list to a full neighbors list.