[us-commits] [ehb54/ultrascan3] 8acebd: perceiver: strip hydrogens and index MODELs in pdb...

emre brookes noreply at github.com
Mon Aug 10 10:03:10 MDT 2026


  Branch: refs/heads/ehb54-issue-980
  Home:   https://github.com/ehb54/ultrascan3
  Commit: 8acebd135a02c9218801afe7af8f87e5b64ef6aa
      https://github.com/ehb54/ultrascan3/commit/8acebd135a02c9218801afe7af8f87e5b64ef6aa
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M us_somo/develop/perceiver/pdb_lite.h
    M us_somo/develop/perceiver/tests/protein_psv.cpp

  Log Message:
  -----------
  perceiver: strip hydrogens and index MODELs in pdb_lite, as SOMO does

Mattia: 'US-SOMO should strip them away! Why isn't it doing it in its tests?
Also the multiple models in NMR-style files. It should correctly recognize them
and perform the calculations anyway.'

He is right, and SOMO itself was never the problem:
 - US_Hydrodyn::read_pdb strips H by name (us_hydrodyn_load.cpp:1489-1492,
   including the ^\dH form that catches 1HB / HD21)
 - it keeps every MODEL in model_vector, with a workaround for files whose
   MODEL tag is missing

perceiver/pdb_lite.h did neither properly: it passed hydrogens straight through
and silently kept only model 1. That is not confined to the psv test -- 2AAS is
the one demo file with hydrogens (7840, 245 in model 1) and it drives regress,
coverage and sssrreal, so every one of those has been perceiving a structure
SOMO would never have handed it.

Fixed at the reader so every test inherits it, rather than patching one test:
 - is_hydrogen_atom() reproduces SOMO's name rule, with one deliberate
   divergence -- an explicit element column wins, so a mercury named HG survives
   where SOMO's name rule would drop it. The perceiver exists for such ligands.
 - MODELs are indexed on the atom; model_count()/model_of() split them. protein_psv
   now computes every model and reports the ensemble spread instead of assuming
   model 1, since which model to use is a later choice (his point exactly).

Effect: 2AAS goes from unusable to agreeing with 8RAT -- the same protein solved
by a different method -- to four decimals, and across its 32 NMR models the psv
spread is 0.0005 cm3/g (0.07%), which is the precision check that ensemble buys.
Regression unchanged and healthy: 97.894% exact, 99.833% geometric perception.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/ultrascan3/settings/notifications


More information about the us-commits mailing list