def coord_counts
import bend-prot@0.1.0.0/topology.bend as Topologyimport Base
import bend-prot@0.1.0.0/protein.bend as P
153# Per-atom neighbor counts: for each x in xs, atoms of ys within dist2 < c2.
154def coord_counts(
155 xs: List<&2, P.Atom>, +ys: List<&2, P.Atom>, +c2: F32
156) -> List<&2, Nat>:
157 match xs:
158 case Nil{}:
159 Nil{}
160 case h <> t:
161 contacts_of_head(h, ys, c2) <> coord_counts(t, ys, c2)