def sumd2_count

bend-prot@0.1.0.0 · topology.bend:61

import bend-prot@0.1.0.0/topology.bend as Topology
import Base
import bend-prot@0.1.0.0/geom.bend as G
import bend-prot@0.1.0.0/protein.bend as P

61# One pass: summed squared distances about qp, plus atom count.
62def sumd2_count(xs: List<&2, P.Atom>, +qp: G.Vec3) -> F32 & Nat:
63  match xs:
64    case Nil{}:
65      (0.0, 0n)
66    case h <> t:
67      sumd2_extend(head_dist2(h, qp), sumd2_count(t, qp))

Uses (9)

Used by (2)