[us-commits] [ehb54/ultrascan3] 9290eb: perceiver: emit both protonation states for ioniza...

emre brookes noreply at github.com
Wed Aug 12 08:13:31 MDT 2026


  Branch: refs/heads/ehb54-issue-980
  Home:   https://github.com/ehb54/ultrascan3
  Commit: 9290eb14043008f1964676f85f19d12d16a8ef85
      https://github.com/ehb54/ultrascan3/commit/9290eb14043008f1964676f85f19d12d16a8ef85
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-12 (Wed, 12 Aug 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_hydration.h
    M us_somo/develop/include/us_hydrodyn_perceive.h
    M us_somo/develop/include/us_hydrodyn_perceive_dialog.h
    M us_somo/develop/src/us_hydrodyn_hydration.cpp
    M us_somo/develop/src/us_hydrodyn_perceive.cpp
    M us_somo/develop/src/us_hydrodyn_perceive_dialog.cpp
    M us_somo/develop/src/us_hydrodyn_residue_builder.cpp

  Log Message:
  -----------
  perceiver: emit both protonation states for ionizable atoms

Option (b), per ehb54. An ionizable atom now gets the 16-field atom line the coded
residues use -- protonated species in fields 1-8, deprotonated in 10-16 -- plus
vbar_ionized and pKa in the residue header.

The convention was read off somo.residue rather than assumed, and it is the same
for acids and bases: primary = protonated, alternate = deprotonated.
    ASP  OD2  O2H1  ...0  |  O1H0-  ...5     COOH  -> COO-
    LYS  NZ   N4H3+ ...3  |  N3H2   ...1     NH3+  -> NH2
    ARG  NH2  N3H2+ ...1  |  N3H1   ...0     guanidinium+ -> neutral

This also fixes what Mattia found on citrate. The old code put the pH-7 water count
on an O2H1 primary -- a row that exists nowhere in somo.residue, since an O2H1 is a
hydroxyl and carries 1 -- and summed those into a bead total of 16. Now the neutral
-COOH carries 0, the alternate carries 5, and the bead total reads 1 for the
neutral state. The 16 was never wrong arithmetic; it was the ionized total written
into a neutral record.

pKa is a CONVENTION value from whichever coded residue shares the group (carboxyl
3.67/4.25 by chain length, the same discriminator the 5-vs-6-water rule already
uses). It is not a prediction: citrate's three carboxyls all come out short-chain
and are proposed at 3.67 where the real values are ~3.13/4.76/6.40 -- which is why
it is presented for the user to accept or change, and labelled as convention in the
REVIEW block.

Alternate mass and radius are resolved from somo.hybrid, not hard-coded; an
alternate type missing from the table is reported and the alternate is not written.

Dialog: three columns on the same row -- Ionized, Ionized hydration (edit), pKa
(edit) -- blank and uneditable for non-ionizable atoms. pKa is per residue, as
somo.residue stores it in the header, so editing it on any row updates them all.
Bad input reverts rather than clamps.

Citrate now emits a 9-field header and 16 fields on exactly the three carboxyl
oxygens. Tests unchanged: unit 86/0, hydration 37/0, psv 60/0, regression 97.894%
exact. libus_somo builds clean.

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


  Commit: 8956bda1bed8ba8995b859bd1bff18ae7902ee40
      https://github.com/ehb54/ultrascan3/commit/8956bda1bed8ba8995b859bd1bff18ae7902ee40
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-12 (Wed, 12 Aug 2026)

  Changed paths:
    M us_somo/develop/src/us_hydrodyn_perceive_dialog.cpp

  Log Message:
  -----------
  perceiver: RasMol shows the structure again, without solvent

Mattia, 2026-08-10: "The 'view Residue in RasMol' was better before, where it was
showed together with the structure (solvent molecules should be, however,
discarded... usually unchecking the H atoms remove waters from visualization)".

Reverts the residue-only view to whole-structure-with-context, but fixes the two
things that made the first version of it unusable:

 - solvent and hydrogens are dropped. Waters buried the residue in a haze of
   oxygens; his own workaround was that unchecking H removes them, so both go.
   Solvent is matched by residue name, hydrogen by the same rule the readers use --
   element column when present, atom name otherwise, including the 1HB form.
 - the view centres ON the residue, not on the model, and zooms in. Centring on the
   model is why 1MBO's sulfate was lost inside the surrounding wireframe and why
   this was reduced to residue-only in the first place.

Protein is thin grey wireframe (15), the residue spacefilled in cpk at wireframe 40,
so it reads as the subject with the fold as context.

The residue-present check still runs against the filtered file, so a structure whose
residue was entirely solvent-named would still report rather than open an empty view.

libus_somo builds clean.

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


Compare: https://github.com/ehb54/ultrascan3/compare/cf0adf435b6d...8956bda1bed8

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