[us-commits] [ehb54/ultrascan3] 34d7c5: perceiver: never compute a psv from unidentified e...
emre brookes
noreply at github.com
Mon Aug 10 08:55:37 MDT 2026
Branch: refs/heads/ehb54-issue-980
Home: https://github.com/ehb54/ultrascan3
Commit: 34d7c5b303f2d8b0ee75f4c88c13badba270c3f3
https://github.com/ehb54/ultrascan3/commit/34d7c5b303f2d8b0ee75f4c88c13badba270c3f3
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M us_somo/develop/include/us_hydrodyn_perceive_elements.h
M us_somo/develop/perceiver/tests/tests_unit.cpp
M us_somo/develop/src/us_hydrodyn_perceive_somo.cpp
M us_somo/develop/src/us_hydrodyn_psv.cpp
Log Message:
-----------
perceiver: never compute a psv from unidentified elements
A PDB with an empty element column (77-78) produced psv values of 0.001,
-0.068, -0.087 -- meaningless numbers that still look like numbers.
1AO6-compl_monA.pdb in the demo set is such a file, which is how it surfaced.
Two independent defects, either alone enough:
1. The atom-name fallback used norm_element(), which only strips
non-alphabetics. So the alpha carbon "CA" became CALCIUM, "NE2" became
NEON, and "CB", "CG", "OD1" matched no element at all. Every atomic volume
increment then evaluated to zero and the sum collapsed to roughly the
electrostriction terms. element_from_atom_name() takes the leading letter,
accepting a two-letter element only when the atom name equals the residue
name -- HETATM "CA" in residue "CA" is calcium, "CA" in "ALA" is carbon.
2. somo_psv::compute() reported ok on a residue containing atoms it had no
increment for. It now counts them, records why in the review block, and
returns ok == false, so the caller emits no psv rather than a plausible
figure. An unidentified element is not a small error; it is not a volume.
The grid volume was unaffected and still looked sensible (Ala 77.45 A^3),
which is precisely why this was not obvious from the output.
tests_unit.cpp gains the case that catches it: CA/CB/CG1/OD1/NE2/NZ/SD/OXT
must resolve by leading letter, while CA-in-CA, FE-in-FE, ZN-in-ZN, MG-in-MG
resolve as the two-letter element. 69 checks, 0 failures.
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