def lj_row_excl

bend-prot@0.1.0.0 · bonded.bend:181

import bend-prot@0.1.0.0/bonded.bend as Bonded
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/force.bend as F

181# Nonbonded rows/totals that skip 1-2 and 1-3 pairs by serial.
182def lj_row_excl(+si: U32, +pi: G.Vec3, +eps: F32, +sig2: F32, +c2: F32, ys: List<&2, P.Atom>, +bonds: List<&2, U32>) -> F32:
183  match ys:
184    case Nil{}:
185      0.0
186    case h <> t:
187      match h:
188        case P.Atom{serial, elem, +pj}:
189          (Bool.pick(F32, excluded(si, serial, bonds), 0.0, F.lj_pair_at(pi, pj, eps, sig2, c2)) + lj_row_excl(si, pi, eps, sig2, c2, t, bonds) : F32)

Uses (9)

Used by (2)