Sim.vv_half_head: def of bend-prot@0.1.0.0 Import: import bend-prot@0.1.0.0/sim.bend as Sim Lines 175-181 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=175&end_line=181 import Base import bend-prot@0.1.0.0/geom.bend as G # Velocity Verlet halves over explicit state (forces must be fresh). def vv_half_head(h: DynAtom, +dt: F32) -> DynAtom: match h: case DA{serial, elem, pos, vel, +frc, +mass}: acc = G.Vec3.scale(((1.0 / mass : F32) * acc_conv() : F32), frc) +vh = G.Vec3.add(vel, G.Vec3.scale((0.5 * dt : F32), acc)) DA{serial, elem, G.Vec3.add(pos, G.Vec3.scale(dt, vh)), vh, frc, mass} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/geom.bend&name=Vec3.add https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/geom.bend&name=Vec3.scale https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/sim.bend&name=DynAtom https://jend.leeeet.dev/definition.txt?path=bend-prot@0.1.0.0/sim.bend&name=acc_conv