Skip to content

skeleton lab on a molecule: mesh_lab makes PDB 1GRL's surface from its blur map; strands follow the helices - #1430

Merged
transfix merged 18 commits into
masterfrom
tmol/mol-skeleton
Nov 22, 2026
Merged

transfix merged 18 commits into
masterfrom
tmol/mol-skeleton

Conversation

@transfix

Copy link
Copy Markdown
Owner

Stacked on #1428 (TexMol T1 part 1), which is stacked on #1427 (M0 part 1). The diff here is the demo's alone. CI runs once the chain reaches master, and the molecule_skeleton golden's PNG comes from that run's llvmpipe artifact, as P2's did.

Joe, 2026-11-21: "i believe skeletonization was meant for molecular data. instead of the bunny, do we have a better data set to use here ... maybe a pdb?" This PR makes the skeleton lab show PDB entry 1GRL, a GroEL subunit from his data directory.

What it adds

  • mesh_lab reads molecule files. A source.file ending in .pdb, .ent, .pqr or .xyzr is read with cvc::mol.
    • Its heavy atoms are blurred with cvc::mol::blur (TexMol's GOABlur, cvc::mol::blur: TexMol's GOABlur density as a stepper, with its A/B against TexMol (TexMol T1 part 1) #1428), and the surface is the blur's isosurface (cvc::iso). It is then placed like any mesh.
    • New keys, each seeded from a prop of the same name: source.blobbiness, source.resolution, source.isovalue and source.hydrogens. They are part of the source's signature, so a change makes load read the file again.
    • The defaults are TexMol's (−2.3442, 1 Å, 1).
    • An isovalue above the density's peak is an error that names the peak.
  • The skeleton lab (examples/ariadne/documents/skeleton_lab.ari) shows 1GRL at blobbiness −0.2, a 2 Å grid and isovalue 10, decimated to 4,000 triangles and skeletonized.
    • A Molecule window changes the blur and makes the surface again.
    • The gallery entry's text and thumbnail are new.
    • mesh_tools is unchanged, so the other documents and goldens that include it keep their images.
  • Why those settings: I tried blobbiness from −2.3 to −0.1, with isovalues set from the density's distribution.
    • At TexMol's default the surface is the atoms' own and the skeleton finds no strands.
    • In blurrier maps the strands run along the helices.
    • At the chosen settings, 81 of 243 helix Cα atoms lie within 3 Å of a strand, against 22 of 232 coil ones: 3.5× chance.
    • Sheets follow the β-strands only weakly.
  • Tests:
    • cvcgl_mesh_skeleton gains a molecule case: the surface realizes from the PDB, the keys are seeded from the props, the decimate and skeleton run, the helix-to-coil ratio stays above 2, and an impossible isovalue is reported.
    • A new golden, molecule_skeleton.ari, skeletonizes 1GRL's isosurface without decimating, so every platform skeletonizes the same points.
    • An arigl-web smoke case, molecule.ari in the docset, served at /apps/mol/. Its page config preloads the PDB, because the page doesn't follow a node's source file on its own.
  • Docs: ARIADNE.md's mesh_lab table and demo paragraph, and the TexMol roadmap's progress.

Testing

  • cvcgl_mesh_skeleton (and its cooperative run), cvcgl_ariadne_views, cvcgl_ariadne_realize, molecule_test, blur_test and skeleton_test pass natively (MSVC Release).
  • cvcgl_ari_golden: molecule_skeleton settles, renders and passes its other checks; its PNG is the one missing piece. The rest pass apart from the pixel checks that only match llvmpipe on this machine's GPU (orthoslicer, contour_tiler, skeleton), the same as on master.
  • The arigl-web smoke case runs in CI's headless Chrome lane; I haven't run it locally.

…ue-atom table (TexMol M0 part 1)

The first TexMol port (docs/roadmap/TEXMOL-F2DOCK-ARISRV-ROADMAP.md, M0), and the first step
toward a skeleton demo on molecular data: a PDB file read into atoms with radii, which T1's blur
turns into a density and its isosurface into the surface mesh_lab skeletonizes.

- inc/cvc/mol/molecule.h: a flat molecule (atoms with serial, name, alternate location,
  residue, chain, insertion code, position, occupancy, B factor, element, HETATM, model, radius,
  charge and table row; HELIX, SHEET and TURN residue ranges; HEADER's id and TITLE), its
  bounds, and the structure an atom's residue lies in.
- Readers: PDB by its fixed columns (v3.3, and the older files whose columns 73-80 hold the
  entry and a line number; elements from columns 77-78 or the atom name, by the PDB's own
  convention), PQR by whitespace (charge and radius from the file), XYZR. A malformed line is an
  error naming the file and line, where TexMol's parser read it as zeros.
- Each app's own file handlers (molecule_handlers(app), an app slot, as point_classes), and
  read_molecule by extension.
- molecule_read_params, a param_table: which model, HETATM, water, hydrogens, alternate
  locations, van der Waals or solvent-enlarged radii, and the radius of an atom the table
  lacks. The defaults keep what TexMol's PDBParser kept.
- residue_atom_table.inc: PDBParser's ElementInformation table (TexMol ed20eae, LGPL-2.1 since
  TexMol#7), all 410 rows, generated from it: radii, colours, hydrophobicities, interface
  propensities, solvent-enlarged radii and charges, looked up by atom and residue name without
  blanks. TexMol gave an atom the table lacks its occupancy as its radius (addAtom's argument
  order); here it gets unknown_radius, 2.0 by default, TexMol's defaultInformation.
- molecule_test (a port test: natively and in the wasm-mt lane): the table, every record kind
  and filter, the older columns and CRLF lines, PQR and XYZR, each reader's errors, two apps'
  handlers, and PDB entry 1GRL, a GroEL subunit: 4,186 atoms, 757 hydrogens, one heavy atom the
  table lacks (OXT), 19 helices and 11 sheet strands.
- src/cvc/tests/data/mol/1grl.pdb (the PDB, CC0) and its notice; the TexMol roadmap's progress.

Not in this part: the group tree, torsions, writers, CLI, pycvc and intrinsics (M0 part 2), and
the A/B against TexMol's parser, which comes with T1's blur in tools/texmol-goldens.
…ldens), its CI job, docs

- tools/texmol-goldens, as tools/volrover-goldens: builds TexMol's PDBParser and Blurmaps'
  GOABlur at a pinned sha (texmol.sha, ed20eae), with two shims (BlurMapsDataManager.h, whose
  getBoundingBox CMake copies out of the legacy source as it is; libcvc 3.x's cvc/endians.h), runs
  them on 1GRL (TexMol's default blobbiness at 1.5 Å, and a low-resolution map, B -0.5 at 2 Å),
  and writes the goldens to src/cvc/tests/data/texmol-goldens/blur; --check makes them again and
  compares (densities to 1e-5 relative). blur_driver.cpp stands in for getBlurredVolume.
- ci.yml: the texmol-goldens job runs --check when the tool, the goldens or 1GRL change.
- blur_test T1: TexMol's atoms and radii (read with unknown_radius 1.0, since TexMol gave an atom
  its table lacks its occupancy), in another order (its group tree keeps a sheet's strands
  together); its grid and box; its densities to 1e-5 relative: 158,394 of 159,120 voxels bit for
  bit at TexMol's default, 68,069 of 70,200 in the low-resolution map, the rest the same float
  sums in TexMol's order.
- blur.h says how close it is; the TexMol roadmap's progress; 1GRL's notice covers the goldens.
…ap, isosurface); its strands follow the helices

Joe: "i believe skeletonization was meant for molecular data. instead of the bunny, do we have a
better data set to use here ... maybe a pdb?"

- mesh_lab: a molecule file (.pdb, .ent, .pqr, .xyzr; cvc::mol) is read as its heavy atoms, blurred
  (cvc::mol::blur) and isosurfaced (cvc::iso); source.blobbiness / resolution / isovalue /
  hydrogens, seeded from the props of those names, are in the source's signature, so load reads it
  again when they change. TexMol's defaults (-2.3442, 1 Å, 1). An isovalue above the density's
  peak is an error naming the peak.
- skeleton_lab.ari: PDB 1GRL (a GroEL subunit) at blobbiness -0.2, 2 Å, isovalue 10, decimated to
  4,000 triangles and skeletonized; a Molecule window changes the blur and makes it again. The
  gallery entry's text and thumbnail. mesh_tools is unchanged (other documents and goldens show it).
- Why those settings: at TexMol's default blobbiness the surface is the atoms' own and the skeleton
  finds no strands; in blurrier maps its strands run along the helices. Here 81 of 243 helix
  C-alphas lie within 3 Å of a strand, 22 of 232 coil ones.
- cvcgl_mesh_skeleton: the molecule case (the surface, the seeded keys, decimate and skeleton, the
  helix/coil ratio above 2, an isovalue above the peak reported).
- Golden molecule_skeleton.ari: 1GRL's isosurface skeletonized as it is (not decimated), so every
  platform skeletonizes the same points; its PNG comes from CI's llvmpipe run.
- arigl-web smoke: molecule.ari in the docset at /apps/mol/, whose page config preloads the PDB.
- ARIADNE.md's mesh_lab table and demo paragraph; the TexMol roadmap's progress.
…he float grid positions' multiply-add and misses TexMol's maps by up to 5e-5
# Conflicts:
#	THIRD_PARTY_NOTICES.md
#	docs/roadmap/TEXMOL-F2DOCK-ARISRV-ROADMAP.md
#	src/cvc/CMakeLists.txt
#	src/cvc/tests/port_tests.cmake
@transfix
transfix changed the base branch from tmol/t1-blur to master November 21, 2026 20:07
@transfix
transfix merged commit 0438ef4 into master Nov 22, 2026
31 checks passed
@transfix
transfix deleted the tmol/mol-skeleton branch November 22, 2026 11:06
transfix added a commit that referenced this pull request Nov 22, 2026
Brings in master through 08a7386 (#1413, #1430, #1446, #1420, #1447, #1435). No conflicts; nothing in it touches state_exec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant