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.

Methods

i

For each neighbor pair (i, j), the first index.

isc

For each neighbor pair (i, j), the supercell indices of j.

j

For each neighbor pair (i, j), the second index.

min_nsc

The minimum nsc for an auxiliary supercell to contain all neighbors in this object.

n_neighbors

Number of atoms that are close to each point

split_indices

Indices to split the interactions of each atom.

Parameters:

points (np.ndarray)

__init__(geometry, points: ndarray, finder_results, split_indices=None)[source]
Parameters:

points (ndarray)

property i: ndarray

For each neighbor pair (i, j), the first index.

property isc: ndarray

For each neighbor pair (i, j), the supercell indices of j.

property j: ndarray

For each neighbor pair (i, j), the second index.

property min_nsc: ndarray

The minimum nsc for an auxiliary supercell to contain all neighbors in this object.

property n_neighbors: ndarray

Number of atoms that are close to each point

property split_indices: ndarray

Indices to split the interactions of each atom.