[us-commits] [ehb54/ultrascan3] fbd259: somo: ask about open RasMol windows on exit, and s...

emre brookes noreply at github.com
Mon Aug 10 09:31:27 MDT 2026


  Branch: refs/heads/somo-dev
  Home:   https://github.com/ehb54/ultrascan3
  Commit: fbd25903bcbb082bfa6ecbdb0ab776e277329c8a
      https://github.com/ehb54/ultrascan3/commit/fbd25903bcbb082bfa6ecbdb0ab776e277329c8a
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn.h
    M us_somo/develop/include/us_hydrodyn_pdb_parsing.h
    M us_somo/develop/src/us_hydrodyn_load.cpp
    M us_somo/develop/src/us_hydrodyn_other.cpp
    M us_somo/develop/src/us_hydrodyn_pdb_parsing.cpp
    M us_somo/develop/src/us_hydrodyn_pdb_tool.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_1d.cpp
    M us_somo/develop/src/us_saxs_util_best.cpp
    M us_somo/develop/src/us_saxs_util_dmd.cpp
    M us_somo/develop/src/us_saxs_util_hydro.cpp
    M us_somo/develop/src/us_saxs_util_loads.cpp
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing.html
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing_expert_mode.html

  Log Message:
  -----------
  somo: ask about open RasMol windows on exit, and skip heavy water

Two housekeeping fixes for ehb54/ultrascan-tickets#1000.

RasMol viewers are started by model_viewer() with startDetached(), so nothing
held on to them.  closeEvent() only ever looked at the legacy `rasmol` QProcess
member, which is allocated but never started - its one launch() call sits inside
#if defined( TODO_FIX_MOVIE_FRAME ) and uses a Qt3 API - so the check never
fired and every viewer SOMO opened was left behind.  Track the detached pids and
ask on exit whether to close them or leave them open.  Liveness and termination
go through small portable helpers rather than QProcess, since a detached child
has no QProcess to ask.

"Skip solvent water molecules" now means light and heavy water everywhere.  The
main GUI reader already listed DOD, but the headless reader, the hydro reader,
1D SAXS, the PDB editor and the BEST/DMD exclusion lists each tested for HOH
alone, so the same structure parsed differently depending on the route - 5PTI,
63 D2O residues, keeps 728 atoms instead of 539 through those paths.  All of
them now share one definition in us_hydrodyn_pdb_parsing.h.  WAT stays out of
it: that is SOMO's own explicit hydration water, not solvent to discard.


  Commit: 10d48cec080b53d282c4412ccfa6b46a44349c9f
      https://github.com/ehb54/ultrascan3/commit/10d48cec080b53d282c4412ccfa6b46a44349c9f
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn_pdb_parsing.h
    M us_somo/develop/src/us_hydrodyn_load.cpp
    M us_somo/develop/src/us_hydrodyn_pdb_parsing.cpp
    M us_somo/develop/src/us_hydrodyn_settings.cpp
    M us_somo/develop/src/us_saxs_util_hydro.cpp
    M us_somo/develop/src/us_saxs_util_loads.cpp
    M us_somo/etc/somo.config.new
    M us_somo/etc/somo.defaults.new
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing.html
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing_expert_mode.html

  Log Message:
  -----------
  somo: add a "Skip deuterium atoms" PDB parsing option

Neutron structures carry deuterium where an X-ray structure carries hydrogen -
5PTI has 103 of them in the protein, on top of its D2O.  The hydrogen test the
readers apply matches names beginning with H only, so those deuteriums survived
parsing and arrived as unknown atoms; somo.residue codes them no better than it
codes hydrogens.

New option below "Skip hydrogen atoms", default on, applied in the same four
readers.  Unlike the hydrogen option it is live rather than greyed out, so the
old behaviour is still reachable, with the deuteriums then falling to the
missing atoms setting.

Deuterium is recognized from the wwPDB element field (columns 77-78) where the
file supplies it and from the atom name otherwise - a name test alone cannot
tell a deuterium from the second letter of a two-letter element, "CD  " being
cadmium.

Persisted through the JSON config alongside the other parsing options, and added
to the somo.config/somo.defaults templates.  Configs written before this option
existed simply take the default, since load_config_json() lays down the
hard-coded defaults before reading.


  Commit: f6627f7cd8c199bd5ffafc5c584bc570f9969003
      https://github.com/ehb54/ultrascan3/commit/f6627f7cd8c199bd5ffafc5c584bc570f9969003
  Author: ehb54 <brookes at uthscsa.edu>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn.h
    M us_somo/develop/src/us_hydrodyn.cpp
    M us_somo/develop/src/us_hydrodyn_script.cpp

  Log Message:
  -----------
  somo: close RasMol viewers a gui_script opened, rather than orphaning them

A gui_script never reaches closeEvent() - "exit" calls exit(0) directly, and
gui_script_error() calls exit(-1) - so the exit prompt was not a hang risk
(guiFlag is false for the duration of a script in any case).  But it also meant
nothing cleaned up: auto_view_pdb is on by default, so any script that loads a
PDB without saying "norasmol" left a RasMol process behind on every run.

Route all three script exits through gui_script_exit(), which closes the
tracked viewers and says so on stdout.  A script that wants them kept says

   rasmol leaveopen

and "rasmol close" spells out the default.  A script that runs off the end
without "exit" hands back to the GUI, where the interactive prompt still
applies - the viewers belong to whoever is now at the keyboard.


  Commit: 8423eafd59f9a43fec0aa39e679c25d4b852bb53
      https://github.com/ehb54/ultrascan3/commit/8423eafd59f9a43fec0aa39e679c25d4b852bb53
  Author: emre brookes <ehb54 at users.noreply.github.com>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M us_somo/develop/include/us_hydrodyn.h
    M us_somo/develop/include/us_hydrodyn_pdb_parsing.h
    M us_somo/develop/src/us_hydrodyn.cpp
    M us_somo/develop/src/us_hydrodyn_load.cpp
    M us_somo/develop/src/us_hydrodyn_other.cpp
    M us_somo/develop/src/us_hydrodyn_pdb_parsing.cpp
    M us_somo/develop/src/us_hydrodyn_pdb_tool.cpp
    M us_somo/develop/src/us_hydrodyn_saxs_1d.cpp
    M us_somo/develop/src/us_hydrodyn_script.cpp
    M us_somo/develop/src/us_hydrodyn_settings.cpp
    M us_somo/develop/src/us_saxs_util_best.cpp
    M us_somo/develop/src/us_saxs_util_dmd.cpp
    M us_somo/develop/src/us_saxs_util_hydro.cpp
    M us_somo/develop/src/us_saxs_util_loads.cpp
    M us_somo/etc/somo.config.new
    M us_somo/etc/somo.defaults.new
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing.html
    M us_somo/somo/doc/manual/somo/somo_pdb_parsing_expert_mode.html

  Log Message:
  -----------
  Merge pull request #506 from ehb54/ehb54-issue-1000

somo: ask about open RasMol windows on exit; skip heavy water and deuterium


Compare: https://github.com/ehb54/ultrascan3/compare/8590afabf8d5...8423eafd59f9

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