vmd.atomsel.contacts

atomsel.contacts()

Finds all atoms in selection within a given distance of any atom in the given selection that are not directly bonded to it. Selections can be in different molecules.

Parameters:
  • selection (atomsel) – Atom selection to compare against
  • cutoff (float) – Distance cutoff for atoms to be considered contacting
Returns:

(2 lists)

Atom indices in this selection, and in given selection

that are within the cutoff.