def lj_frow_excl
bend-prot@0.1.0.0 · bonded.bend:244
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
244
245def lj_frow_excl(+si: U32, +pi: G.Vec3, +eps: F32, +sig2: F32, +c2: F32, ys: List<&2, P.Atom>, +bonds: List<&2, U32>) -> G.Vec3:
246 match ys:
247 case Nil{}:
248 G.V3{0.0, 0.0, 0.0}
249 case h <> t:
250 match h:
251 case P.Atom{serial, elem, +pj}:
252 G.Vec3.add(lj_frow_excl(si, pi, eps, sig2, c2, t, bonds), Bool.pick(G.Vec3, excluded(si, serial, bonds), G.V3{0.0, 0.0, 0.0}, F.lj_fat(pi, pj, eps, sig2, c2)))