biopython v1.71.0 Bio.PDB.NeighborSearch.NeighborSearch

Class for neighbor searching,

This class can be used for two related purposes:

  1. To find all atoms/residues/chains/models/structures within radius of a given query position.
  2. To find all atoms/residues/chains/models/structures that are within a fixed radius of each other.

NeighborSearch makes use of the Bio.KDTree C++ module, so it’s fast.

Link to this section Summary


Initialize the class

Neighbor search

All neighbor search

Link to this section Functions

Initialize the class.

Neighbor search.

Return all atoms/residues/chains/models/structures that have at least one atom within radius of center. What entity level is returned (e.g. atoms or residues) is determined by level (A=atoms, R=residues, C=chains, M=models, S=structures).


  • center - Numeric array
  • radius - float
  • level - char (A, R, C, M, S)

All neighbor search.

Search all entities that have atoms pairs within radius.


  • radius - float
  • level - char (A, R, C, M, S)