Sim.dyn_set_force: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/sim.bend as Sim Lines 144-156 of bend-prot@0.1.0.0/sim.bend: https://jend.leeeet.dev/read.txt?path=bend-prot@0.1.0.0/sim.bend&start_line=144&end_line=156 import Base import bend-prot@0.1.0.0/geom.bend as G # Set per-atom forces from a force list (truncates to the shorter). def dyn_set_force(ds: List<&2, DynAtom>, fs: List<&2, G.Vec3>) -> List<&2, DynAtom>: match ds: case Nil{}: Nil{} case h <> t: match h: case DA{serial, elem, pos, vel, frc, mass}: match fs: case Nil{}: DA{serial, elem, pos, vel, G.V3{0.0, 0.0, 0.0}, mass} <> t case f <> ft: DA{serial, elem, pos, vel, f, mass} <> dyn_set_force(t, ft) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/geom.bend&name=Vec3 https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/sim.bend&name=DynAtom