sisl.geom.CoordsNeighborList
- class sisl.geom.CoordsNeighborList
Bases:
NeighborsList of atoms that are close to a set of coordinates in space.
Examples
You can get a coordinates neighbors list from the find_close method of a
NeighborFinderobject. Then, you can retrieve 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 coords = [[0, 0, 0], [2, 0, 0]] neighbors = finder.find_close(coords) # You can loop through coordinates to get their neighbors for coord_neighs in neighbors: print() print(f"NEIGHBORS OF COORDINATE {coord_neighs.xyz} ({coord_neighs.n_neighbors} neighbors): ") print("J", coord_neighs.J) print("ISC", coord_neighs.isc) # Or get the neighbors of a particular coordinate: neighbors[0].J
See also
CoordNeighborListThe 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 second index.
Same as
I, provided for backwards compatibility, may be deprecated laterFor each neighbor pair (I, J), the supercell indices of \(J\).
Same as
J, provided for backwards compatibility, may be deprecated laterThe minimum nsc for an auxiliary supercell to contain all neighbors in this object.
Number of atoms that are close to each coordinate
Indices to split the interactions of each atom.