“near_to” finds atoms in the first selection within a cutoff distance of atoms in the second selection.
selection near_to distance of selection
polymer near_to 5.0 of chain a
By default, this operation is performed over all states. However, when a state number is provided to the select operator, the operation can be restricted to a single state.
If the two selections overlap, “near_to” will only return atoms in the first selection that are not present in the second. Note that this behavior is different from that of within which will return atoms in both selections.