parmed.utils.pairlist module

A module for efficiently building a pairlist with memory and CPU cost O(N)

parmed.utils.pairlist.find_atom_pairs(struct, dist, subset=None)[source]

Finds all pairs of atoms in a structure within a requested distance

Parameters
structparmed.structure.Structure

The structure for which to find all atom pairs

distfloat

The maximum distance between identified pairs. No pairs separated by less than dist will be omitted, although some pairs greater than dist will be identified.

subsetset of Atom, optional

If specified, the pairlist will be built only considering these atoms

Returns
pairslist of set of Atom

The list of set of atoms that may be pairs

Raises
ValueError if struct does not have any coordinates.

Notes

This function does not do anything with periodic boundary conditions.