def count_par4

bend-prot@0.1.0.0 · par.bend:16

import bend-prot@0.1.0.0/par.bend as Par
import Base
import bend-prot@0.1.0.0/geom.bend as G
import bend-prot@0.1.0.0/protein.bend as P
import bend-prot@0.1.0.0/topology.bend as T

16def count_par4(xs: List<&2, P.Atom>, +qp: G.Vec3, +c2: F32) -> Nat:
17  match xs:
18    case h1 <> h2 <> h3 <> h4 <> t:
19      a b = T.head_hit_nat(h1, qp, c2) T.head_hit_nat(h2, qp, c2)
20      c d = T.head_hit_nat(h3, qp, c2) T.head_hit_nat(h4, qp, c2)
21      Nat.add(Nat.add(a, b), Nat.add(c, Nat.add(d, count_par4(t, qp, c2))))
22    case rest:
23      T.count_below(rest, qp, c2)

Uses (8)

Used by (4)