def energy_sum

bend-prot@0.1.0.0 · sim.bend:264

import bend-prot@0.1.0.0/sim.bend as Sim
import Base
import bend-prot@0.1.0.0/protein.bend as P
import bend-prot@0.1.0.0/bonded.bend as B

264# Reportable potential: excluded uniform LJ + Coulomb + bonds.
265def energy_sum(+xs: List<&2, P.Atom>, +qs: List<&2, F32>, +bonds: List<&2, U32>, +p: SimParams) -> F32:
266  match p:
267    case SP{+eps, +sig2, +c2, +ke, +kbond}:
268      ((B.lj_total_excl(xs, xs, eps, sig2, c2, bonds) + B.coul_total_excl(xs, qs, xs, qs, ke, c2, bonds) : F32) + B.bond_total(xs, pairs_of_flat(bonds), kbond) : F32)

Uses (10)

Used by (1)