def parse_atom_z
import bend-prot@0.1.0.0/pdb.bend as Pdbimport Base
import bend-prot@0.1.0.0/geom.bend as G
import bend-prot@0.1.0.0/protein.bend as P
246# One ATOM line -> (chain, seq, atom). None{} when any field fails.
247# Threaded bottom-up: each helper matches one Maybe and passes the rest on.
248def parse_atom_z(serial: U32, ch: U32, seq: Nat, x: F32, y: F32, mz: Maybe<&2, F32>, elem_s: String, name_s: String) -> Maybe<&1, U32 & Nat & P.Atom>:
249 match mz:
250 case None{}:
251 None{}
252 case Some{z}:
253 Some{(ch, seq, P.Atom{serial, elem_of(elem_s, name_s), G.V3{x, y, z}})}