def dyn_atoms
import bend-prot@0.1.0.0/sim.bend as Simimport Base
import bend-prot@0.1.0.0/protein.bend as P
47def dyn_atoms(ds: List<&2, DynAtom>) -> List<&2, P.Atom>:
48 match ds:
49 case Nil{}:
50 Nil{}
51 case h <> t:
52 match h:
53 case DA{serial, elem, pos, vel, frc, mass}:
54 P.Atom{serial, elem, pos} <> dyn_atoms(t)