pwtools.crys.nearest_neighbors_from_dists

pwtools.crys.nearest_neighbors_from_dists(dists, symbols, idx=None, skip=None, cutoff=None, num=None, pbc=True, sort=True, fullout=False)[source]

Core part of nearest_neighbors(), which accepts pre-calculated distances.

Can be more efficient in loops where many different nearest neighbors should be calculated from the same distances.

Parameters:
  • dists (2d array (natoms,natoms)) – Cartesian distances (see distances()).

  • symbols (sequence of strings (natoms,)) – Atom symbols, i.e. struct.symbols

  • nearest_neighbors(). (Rest see) –