sisl.geom.FullNeighborList
- class sisl.geom.FullNeighborList(geometry: Geometry, finder_results: ndarray, split_indices: ndarray | None = None)
Bases:
AtomsNeighborList
Full neighbors list of a system.
This class, contrary to
UniqueNeighborList
, (possibly) contains the two directions of an interaction between two given atoms. Notice that it is possible that there is a connection from atomi
to atomj
but not the other way around.Examples
You can get a full neighbors list from the find_neighbors 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 full neighbors list neighbors = finder.find_neighbors() # You can loop through atoms to get their neighbors for at_neighs in neighbors: print() print(f"NEIGHBORS OF ATOM {at_neighs.atom} ({at_neighs.n_neighbors} neighbors): ") print("J", at_neighs.j) print("ISC", at_neighs.isc) # Or get the neighbors of a particular atom: neighbors[0].j
See also
AtomNeighborList
The object returned by this list when iterating or indexing.
Methods
Converts the full neighbors list to a unique 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_unique() UniqueNeighborList [source]
Converts the full neighbors list to a unique neighbors list.