sisl.geom.PointsNeighborList
- class sisl.geom.PointsNeighborList(geometry, points: ndarray, finder_results, split_indices=None)
Bases:
Neighbors
List of atoms that are close to a set of points in space.
Examples
You can get a points neighbors list from the find_close 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 points = [[0, 0, 0], [2, 0, 0]] neighbors = finder.find_close(points) # You can loop through points to get their neighbors for point_neighs in neighbors: print() print(f"NEIGHBORS OF POINT {point_neighs.point} ({point_neighs.n_neighbors} neighbors): ") print("J", point_neighs.j) print("ISC", point_neighs.isc) # Or get the neighbors of a particular point: neighbors[0].j
See also
PointNeighborList
The object returned by this list when iterating or indexing.
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 atoms that are close to each point
Indices to split the interactions of each atom.