pwtools.crys.nearest_neighbors_struct

pwtools.crys.nearest_neighbors_struct(struct, **kwds)[source]

Return Structure with only nearest neighbors.

Calls nearest_neighbors() and takes the same arguments. The returned Structure contains the central atom set by the idx keyword to nearest_neighbors().

Examples

>>> from pwtools import crys, visualize
>>> st = crys.nearest_neighbors_struct(struct, cutoff=3.3, skip='H')
>>> visualize.view_avogadro(st)